mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-06-22 10:49:58 -04:00
handle close wait
This commit is contained in:
@@ -113,7 +113,7 @@ func (v *Client) Process(ctx context.Context, outboundRay ray.OutboundRay) error
|
||||
return err
|
||||
}
|
||||
|
||||
if err := buf.PipeUntilEOF(responseReader, outboundRay.OutboundOutput()); err != nil {
|
||||
if err := buf.Pipe(responseReader, outboundRay.OutboundOutput()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -122,8 +122,6 @@ func (v *Client) Process(ctx context.Context, outboundRay ray.OutboundRay) error
|
||||
|
||||
if err := signal.ErrorOrFinish2(ctx, requestDone, responseDone); err != nil {
|
||||
log.Info("Shadowsocks|Client: Connection ends with ", err)
|
||||
outboundRay.OutboundInput().CloseError()
|
||||
outboundRay.OutboundOutput().CloseError()
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -155,7 +153,7 @@ func (v *Client) Process(ctx context.Context, outboundRay ray.OutboundRay) error
|
||||
User: user,
|
||||
}
|
||||
|
||||
if err := buf.PipeUntilEOF(reader, outboundRay.OutboundOutput()); err != nil {
|
||||
if err := buf.Pipe(reader, outboundRay.OutboundOutput()); err != nil {
|
||||
log.Info("Shadowsocks|Client: Failed to transport all UDP response: ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ func (s *Server) handleConnection(ctx context.Context, conn internet.Connection)
|
||||
return err
|
||||
}
|
||||
|
||||
if err := buf.PipeUntilEOF(ray.InboundOutput(), responseWriter); err != nil {
|
||||
if err := buf.Pipe(ray.InboundOutput(), responseWriter); err != nil {
|
||||
log.Info("Shadowsocks|Server: Failed to transport all TCP response: ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user