fix: ensure return a nil interface not an interface with nil value
This commit is contained in:
parent
63510ea0cf
commit
70538347b8
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue