Commit 64b46c1d authored by Steven Allen's avatar Steven Allen

avoid removing message senders when still connected

parent 36ae474b
......@@ -80,14 +80,14 @@ func (nn *netNotifiee) Disconnected(n inet.Network, v inet.Conn) {
p := v.RemotePeer()
func() {
dht.plk.Lock()
defer dht.plk.Unlock()
dht.plk.Lock()
defer dht.plk.Unlock()
if dht.host.Network().Connectedness(p) == inet.Connected {
// We're still connected.
return
}
if dht.host.Network().Connectedness(p) != inet.Connected {
dht.routingTable.Remove(p)
}
}()
dht.routingTable.Remove(p)
dht.smlk.Lock()
defer dht.smlk.Unlock()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment