From e21b0e4d9977258863c02cf5b1c2ab6451742177 Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 12 Aug 2024 12:52:03 +0200 Subject: [PATCH] revert yamux change --- libp2p/muxers/yamux/yamux.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libp2p/muxers/yamux/yamux.nim b/libp2p/muxers/yamux/yamux.nim index 57f422055..667f60fba 100644 --- a/libp2p/muxers/yamux/yamux.nim +++ b/libp2p/muxers/yamux/yamux.nim @@ -12,7 +12,6 @@ import sequtils, std/[tables] import chronos, chronicles, metrics, stew/[endians2, byteutils, objects] import ../muxer, ../../stream/connection -import ../../utils/future export muxer @@ -281,7 +280,7 @@ method readOnce*( if channel.recvQueue.len == 0: channel.receivedData.clear() try: # https://github.com/status-im/nim-chronos/issues/516 - discard await raceCancel(@[channel.closedRemotely.wait(), channel.receivedData.wait()]) + discard await race(channel.closedRemotely.wait(), channel.receivedData.wait()) except ValueError: raiseAssert("Futures list is not empty") if channel.closedRemotely.isSet() and channel.recvQueue.len == 0: