mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-12 21:18:03 +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 {
|
func (wsedc *websocketWithEarlyDataConn) Close() error {
|
||||||
wsedc.closed = true
|
wsedc.closed = true
|
||||||
wsedc.cancel()
|
wsedc.cancel()
|
||||||
if wsedc.Conn == nil {
|
if wsedc.Conn == nil { // is dialing or not dialed
|
||||||
return nil
|
return wsedc.underlay.Close()
|
||||||
}
|
}
|
||||||
return wsedc.Conn.Close()
|
return wsedc.Conn.Close()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user