|
|
@ -61,10 +61,12 @@ 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)
|
|
|
|
|
|
|
|
if !sb.session.IsClosed() {
|
|
|
|
sb.session.SetTerminalMsg("no underlying connection left")
|
|
|
|
sb.session.SetTerminalMsg("no underlying connection left")
|
|
|
|
sb.session.passiveClose()
|
|
|
|
sb.session.passiveClose()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// a pointer to connId is passed here so that the switchboard can reassign it
|
|
|
|
// a pointer to connId is passed here so that the switchboard can reassign it
|
|
|
|
func (sb *switchboard) send(data []byte, connId *uint32) (n int, err error) {
|
|
|
|
func (sb *switchboard) send(data []byte, connId *uint32) (n int, err error) {
|
|
|
|