From 70538347b82bc12f33bb5bbe310fa0664168661f Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sat, 18 Feb 2023 14:16:03 +0800 Subject: [PATCH] fix: ensure return a nil interface not an interface with nil value --- transport/vmess/websocket.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transport/vmess/websocket.go b/transport/vmess/websocket.go index cc747803..71dabbdd 100644 --- a/transport/vmess/websocket.go +++ b/transport/vmess/websocket.go @@ -306,6 +306,9 @@ func (wsedc *websocketWithEarlyDataConn) LazyHeadroom() bool { } func (wsedc *websocketWithEarlyDataConn) Upstream() any { + if wsedc.Conn == nil { // ensure return a nil interface not an interface with nil value + return nil + } return wsedc.Conn }