1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 01:12:24 +08:00

dht/notif: bugfix in hanging connects

http://gifs.gifbin.com/012011/1295375531_cat-jump-fail.gif
This commit is contained in:
Juan Batiz-Benet
2015-02-01 01:43:58 -08:00
parent c372255807
commit a2e3ea6236

View File

@ -18,6 +18,7 @@ func (nn *netNotifiee) Connected(n inet.Network, v inet.Conn) {
select {
case <-dht.Closing():
return
default:
}
dht.Update(dht.Context(), v.RemotePeer())
}
@ -27,6 +28,7 @@ func (nn *netNotifiee) Disconnected(n inet.Network, v inet.Conn) {
select {
case <-dht.Closing():
return
default:
}
dht.routingTable.Remove(v.RemotePeer())
}