fix: ensure return a nil interface not an interface with nil value

This commit is contained in:
gVisor bot 2023-02-18 14:16:03 +08:00
parent 63510ea0cf
commit 70538347b8

View file

@ -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
}