mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
fix lint warnings
This commit is contained in:
parent
7c751fcca0
commit
7d31c0641b
@ -96,7 +96,10 @@ func (v *Handler) Dispatch(destination v2net.Destination, payload *buf.Buffer, r
|
|||||||
output := ray.OutboundOutput()
|
output := ray.OutboundOutput()
|
||||||
|
|
||||||
if !payload.IsEmpty() {
|
if !payload.IsEmpty() {
|
||||||
conn.Write(payload.Bytes())
|
if _, err := conn.Write(payload.Bytes()); err != nil {
|
||||||
|
log.Warning("Freedom: Failed to write to destination: ", destination, ": ", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -223,7 +223,7 @@ func (v *Server) GenerateResponse(statusCode int, status string) *http.Response
|
|||||||
Header: hdr,
|
Header: hdr,
|
||||||
Body: nil,
|
Body: nil,
|
||||||
ContentLength: 0,
|
ContentLength: 0,
|
||||||
Close: false,
|
Close: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,6 +247,8 @@ func (v *Server) handlePlainHTTP(request *http.Request, session *proxy.SessionIn
|
|||||||
go func() {
|
go func() {
|
||||||
defer finish.Done()
|
defer finish.Done()
|
||||||
requestWriter := bufio.NewWriter(buf.NewBytesWriter(ray.InboundInput()))
|
requestWriter := bufio.NewWriter(buf.NewBytesWriter(ray.InboundInput()))
|
||||||
|
defer requestWriter.Release()
|
||||||
|
|
||||||
err := request.Write(requestWriter)
|
err := request.Write(requestWriter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warning("HTTP: Failed to write request: ", err)
|
log.Warning("HTTP: Failed to write request: ", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user