This commit is contained in:
Audrius Butkevicius 2015-07-17 22:04:02 +01:00
parent 37ad20a71b
commit d0229b62da

View File

@ -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()
// Only delete the outbox if the client join, as it migth be a
// lookup request coming from the same client.
if joined {
outboxesMut.Lock() outboxesMut.Lock()
delete(outboxes, id) delete(outboxes, id)
outboxesMut.Unlock() outboxesMut.Unlock()
}
return return
case <-pingTicker.C: case <-pingTicker.C:
if !joined { if !joined {