fix: ensure return a nil interface not an interface with nil value
This commit is contained in:
parent
cc3a9dd553
commit
b9e63d3f7d
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