use put instead of putNoWait
This commit is contained in:
parent
36d9ec7e48
commit
6d9cbf4bec
|
@ -264,11 +264,11 @@ proc sendEncoded*(p: PubSubPeer, msg: seq[byte], isHighPriority: bool = false) {
|
||||||
return
|
return
|
||||||
|
|
||||||
if isHighPriority:
|
if isHighPriority:
|
||||||
p.rpcmessagequeue.priorityQueue.putNoWait(msg)
|
await p.rpcmessagequeue.priorityQueue.put(msg)
|
||||||
when defined(libp2p_expensive_metrics):
|
when defined(libp2p_expensive_metrics):
|
||||||
libp2p_gossipsub_priority_queue_size.inc(labelValues = [$p.peerId])
|
libp2p_gossipsub_priority_queue_size.inc(labelValues = [$p.peerId])
|
||||||
else:
|
else:
|
||||||
p.rpcmessagequeue.nonPriorityQueue.putNoWait(msg)
|
await p.rpcmessagequeue.nonPriorityQueue.put(msg)
|
||||||
when defined(libp2p_expensive_metrics):
|
when defined(libp2p_expensive_metrics):
|
||||||
libp2p_gossipsub_non_priority_queue_size.inc(labelValues = [$p.peerId])
|
libp2p_gossipsub_non_priority_queue_size.inc(labelValues = [$p.peerId])
|
||||||
trace "message queued", p, msg = shortLog(msg)
|
trace "message queued", p, msg = shortLog(msg)
|
||||||
|
|
Loading…
Reference in New Issue