From d6a758b261354ef9543099c6b1fb50972bebc156 Mon Sep 17 00:00:00 2001 From: Wondertan Date: Sat, 28 Jan 2023 16:27:19 +0100 Subject: [PATCH] fix(basichost): Emit EvtConnectednessChanged for Connected asynchronously --- p2p/host/basic/peer_connectedness.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/host/basic/peer_connectedness.go b/p2p/host/basic/peer_connectedness.go index bfc46ed8f8..00542e0b2b 100644 --- a/p2p/host/basic/peer_connectedness.go +++ b/p2p/host/basic/peer_connectedness.go @@ -31,7 +31,7 @@ func (w *peerConnectWatcher) ListenClose(network.Network, ma.Multiaddr) {} func (w *peerConnectWatcher) Connected(n network.Network, conn network.Conn) { p := conn.RemotePeer() - w.handleTransition(p, n.Connectedness(p)) + go w.handleTransition(p, n.Connectedness(p)) } func (w *peerConnectWatcher) Disconnected(n network.Network, conn network.Conn) {