From a2e3ea623656af0419f5b8c7b2c50b4d04e86a49 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Sun, 1 Feb 2015 01:43:58 -0800 Subject: [PATCH] dht/notif: bugfix in hanging connects http://gifs.gifbin.com/012011/1295375531_cat-jump-fail.gif --- routing/dht/notif.go | 2 ++ 1 file changed, 2 insertions(+) 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()) }