1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-29 02:35:23 +00:00

Fix shadowsocks client handling proxied connection

This commit is contained in:
Darien Raymond 2016-12-21 10:45:47 +01:00
parent bccf11c12c
commit bb498cbfa8
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -99,9 +99,11 @@ func (v *Client) Dispatch(destination v2net.Destination, payload *buf.Buffer, ra
return
}
if err := bodyWriter.Write(payload); err != nil {
log.Info("Shadowsocks|Client: Failed to write payload: ", err)
return
if !payload.IsEmpty() {
if err := bodyWriter.Write(payload); err != nil {
log.Info("Shadowsocks|Client: Failed to write payload: ", err)
return
}
}
var responseMutex sync.Mutex