mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-12 13:08:09 +08:00
fix: websocketWithEarlyDataConn can't close underlay conn when is dialing or not dialed
This commit is contained in:
parent
487d7fa81f
commit
e8af058694
@ -247,8 +247,8 @@ func (wsedc *websocketWithEarlyDataConn) Read(b []byte) (int, error) {
|
||||
func (wsedc *websocketWithEarlyDataConn) Close() error {
|
||||
wsedc.closed = true
|
||||
wsedc.cancel()
|
||||
if wsedc.Conn == nil {
|
||||
return nil
|
||||
if wsedc.Conn == nil { // is dialing or not dialed
|
||||
return wsedc.underlay.Close()
|
||||
}
|
||||
return wsedc.Conn.Close()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user