update chronos

This commit is contained in:
Diego 2024-01-22 23:49:48 +01:00
parent f34f30de93
commit 6d50a80f4d
No known key found for this signature in database
GPG Key ID: C9DAC9BF68D1F806
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
bearssl;https://github.com/status-im/nim-bearssl@#e4157639db180e52727712a47deaefcbbac6ec86
chronicles;https://github.com/status-im/nim-chronicles@#32ac8679680ea699f7dbc046e8e0131cac97d41a
chronos;https://github.com/status-im/nim-chronos@#ba143e029f35fd9b4cd3d89d007cc834d0d5ba3c
chronos;https://github.com/status-im/nim-chronos@#e15dc3b41fea95348b58f32244962c1c6df310a7
dnsclient;https://github.com/ba0f3/dnsclient.nim@#23214235d4784d24aceed99bbfe153379ea557c8
faststreams;https://github.com/status-im/nim-faststreams@#720fc5e5c8e428d9d0af618e1e27c44b42350309
httputils;https://github.com/status-im/nim-http-utils@#3b491a40c60aad9e8d3407443f46f62511e63b18

View File

@ -367,9 +367,10 @@ proc processMessages(p: PubSubPeer) {.async.} =
await conn.close() # This will clean up the send connection
while true:
var futs = @[p.rpcmessagequeue.priorityQueue.isNotempty(), p.rpcmessagequeue.nonPriorityQueue.isNotempty()]
# We nedd the cast because a seq[InternalRaisesFuture[T, E]] is not considered a subtype of seq[Future[T]]
var futs = @[cast[Future[void]](p.rpcmessagequeue.priorityQueue.isNotempty()), cast[Future[void]](p.rpcmessagequeue.nonPriorityQueue.isNotempty())]
try:
discard await anyCompleted(futs)#.wait(self.connectTimeout)
discard await anyCompleted(futs)
trace "waiting for message", p
finally:
for fut in futs: fut.cancel()