mirror of https://github.com/cbeuw/Cloak
Check before passive close
This commit is contained in:
parent
3b3cd277f8
commit
beb6568ce0
|
|
@ -61,8 +61,10 @@ func (sb *switchboard) removeConn(connId uint32) {
|
||||||
sb.connsM.Unlock()
|
sb.connsM.Unlock()
|
||||||
if remaining == 0 {
|
if remaining == 0 {
|
||||||
atomic.StoreUint32(&sb.broken, 1)
|
atomic.StoreUint32(&sb.broken, 1)
|
||||||
sb.session.SetTerminalMsg("no underlying connection left")
|
if !sb.session.IsClosed() {
|
||||||
sb.session.passiveClose()
|
sb.session.SetTerminalMsg("no underlying connection left")
|
||||||
|
sb.session.passiveClose()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue