Skip to content

Commit

Permalink
Fix shadowsocks client handling proxied connection
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Dec 21, 2016
1 parent bccf11c commit bb498cb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions proxy/shadowsocks/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb498cb

Please sign in to comment.