diff --git a/protocol/socks/handshake.go b/protocol/socks/handshake.go index 81869fb..5d98b8d 100644 --- a/protocol/socks/handshake.go +++ b/protocol/socks/handshake.go @@ -216,6 +216,7 @@ func HandleConnection0(ctx context.Context, conn net.Conn, version byte, authent close(done) }() err = common.Error(io.Copy(io.Discard, conn)) + <-done return E.Errors(innerError, err) default: err = socks5.WriteResponse(conn, socks5.Response{