diff --git a/libp2p/protocols/pubsub/pubsubpeer.nim b/libp2p/protocols/pubsub/pubsubpeer.nim index 0b58614d0..1bbfdbcd8 100644 --- a/libp2p/protocols/pubsub/pubsubpeer.nim +++ b/libp2p/protocols/pubsub/pubsubpeer.nim @@ -207,7 +207,8 @@ proc sendGraft*(p: PubSubPeer, topics: seq[string]) {.async.} = try: await p.send(RPCMsg(control: some( - ControlMessage(graft: topics.mapIt(ControlGraft(topicID: it)))))) + ControlMessage(graft: topics.mapIt(ControlGraft(topicID: it))))), + timeout = 1.minutes) except CancelledError as exc: raise exc except CatchableError as exc: @@ -218,7 +219,8 @@ proc sendPrune*(p: PubSubPeer, topics: seq[string]) {.async.} = try: await p.send(RPCMsg(control: some( - ControlMessage(prune: topics.mapIt(ControlPrune(topicID: it)))))) + ControlMessage(prune: topics.mapIt(ControlPrune(topicID: it))))), + timeout = 1.minutes) except CancelledError as exc: raise exc except CatchableError as exc: diff --git a/libp2p/switch.nim b/libp2p/switch.nim index 254ee0ca1..30cc7568e 100644 --- a/libp2p/switch.nim +++ b/libp2p/switch.nim @@ -511,14 +511,14 @@ proc pubsubMonitor(s: Switch, peer: PeerInfo) {.async.} = while s.isConnected(peer): try: - debug "subscribing to pubsub peer", peer = $peer + trace "subscribing to pubsub peer", peer = $peer await s.subscribePeerInternal(peer) except CancelledError as exc: raise exc except CatchableError as exc: trace "exception in pubsub monitor", peer = $peer, exc = exc.msg finally: - debug "sleeping before trying pubsub peer", peer = $peer + trace "sleeping before trying pubsub peer", peer = $peer await sleepAsync(1.seconds) # allow the peer to cooldown trace "exiting pubsub monitor", peer = $peer