mirror of
https://github.com/MetaCubeX/Clash.Meta.git
synced 2025-04-16 07:20:58 +00:00
fix: websocketWithEarlyDataConn can't close underlay conn when is dialing or not dialed
This commit is contained in:
parent
487d7fa81f
commit
e8af058694
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue