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:
@ -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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user