diff --git a/routing/dht/notif.go b/routing/dht/notif.go index 82e097753..4af2fc978 100644 --- a/routing/dht/notif.go +++ b/routing/dht/notif.go @@ -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()) }