From f7e9d9ab1fecc7e00b51c5dd569632c3d6e6c737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 28 Feb 2023 20:16:15 +0800 Subject: [PATCH] Fix check early conn --- outbound/default.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outbound/default.go b/outbound/default.go index 1e615701..3b5c0c1b 100644 --- a/outbound/default.go +++ b/outbound/default.go @@ -87,7 +87,7 @@ func CopyEarlyConn(ctx context.Context, conn net.Conn, serverConn net.Conn) erro return bufio.CopyConn(ctx, conn, serverConn) } } - if earlyConn, isEarlyConn := common.Cast[N.EarlyConn](conn); isEarlyConn && earlyConn.NeedHandshake() { + if earlyConn, isEarlyConn := common.Cast[N.EarlyConn](serverConn); isEarlyConn && earlyConn.NeedHandshake() { _payload := buf.StackNew() payload := common.Dup(_payload) err := conn.SetReadDeadline(time.Now().Add(C.ReadPayloadTimeout))