mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-06 01:05:35 -05:00
handle empty payload
This commit is contained in:
@@ -142,8 +142,10 @@ func (this *Client) Dispatch(destination v2net.Destination, payload *alloc.Buffe
|
||||
Writer: conn,
|
||||
Request: request,
|
||||
}
|
||||
if err := writer.Write(payload); err != nil {
|
||||
return errors.New("Shadowsocks|Client: Failed to write payload: " + err.Error())
|
||||
if !payload.IsEmpty() {
|
||||
if err := writer.Write(payload); err != nil {
|
||||
return errors.New("Shadowsocks|Client: Failed to write payload: " + err.Error())
|
||||
}
|
||||
}
|
||||
v2io.Pipe(ray.OutboundInput(), writer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user