diff --git a/p2p/protocol/identify/id.go b/p2p/protocol/identify/id.go index 390e8afb7..72d591ec5 100644 --- a/p2p/protocol/identify/id.go +++ b/p2p/protocol/identify/id.go @@ -350,6 +350,7 @@ func (ids *idService) IdentifyWait(c network.Conn) <-chan struct{} { e, found := ids.conns[c] if !found { // No entry found. Connection was most likely closed (and removed from this map) recently. + log.Debugw("connection not found in identify service", "peer", c.RemotePeer()) ch := make(chan struct{}) close(ch) return ch diff --git a/p2p/protocol/identify/id_test.go b/p2p/protocol/identify/id_test.go index 00aeecb18..6dc4b99ae 100644 --- a/p2p/protocol/identify/id_test.go +++ b/p2p/protocol/identify/id_test.go @@ -890,7 +890,7 @@ func TestIncomingIDStreamsTimeout(t *testing.T) { } } return true - }, 1*time.Second, 200*time.Millisecond) + }, 5*time.Second, 200*time.Millisecond) } } diff --git a/p2p/protocol/identify/obsaddr_test.go b/p2p/protocol/identify/obsaddr_test.go index aa347e59e..e807dd08b 100644 --- a/p2p/protocol/identify/obsaddr_test.go +++ b/p2p/protocol/identify/obsaddr_test.go @@ -71,14 +71,14 @@ func (h *harness) connInbound(observer peer.ID) network.Conn { func (h *harness) observe(observed ma.Multiaddr, observer peer.ID) network.Conn { c := h.conn(observer) h.oas.Record(c, observed) - time.Sleep(50 * time.Millisecond) // let the worker run + time.Sleep(200 * time.Millisecond) // let the worker run return c } func (h *harness) observeInbound(observed ma.Multiaddr, observer peer.ID) network.Conn { c := h.connInbound(observer) h.oas.Record(c, observed) - time.Sleep(50 * time.Millisecond) // let the worker run + time.Sleep(200 * time.Millisecond) // let the worker run return c }