Fix bugs
This commit is contained in:
parent
37ad20a71b
commit
d0229b62da
|
@ -166,9 +166,13 @@ func protocolConnectionHandler(tcpConn net.Conn, config *tls.Config) {
|
||||||
// Potentially closing a second time.
|
// Potentially closing a second time.
|
||||||
close(outbox)
|
close(outbox)
|
||||||
conn.Close()
|
conn.Close()
|
||||||
outboxesMut.Lock()
|
// Only delete the outbox if the client join, as it migth be a
|
||||||
delete(outboxes, id)
|
// lookup request coming from the same client.
|
||||||
outboxesMut.Unlock()
|
if joined {
|
||||||
|
outboxesMut.Lock()
|
||||||
|
delete(outboxes, id)
|
||||||
|
outboxesMut.Unlock()
|
||||||
|
}
|
||||||
return
|
return
|
||||||
case <-pingTicker.C:
|
case <-pingTicker.C:
|
||||||
if !joined {
|
if !joined {
|
||||||
|
|
Loading…
Reference in New Issue