From ff619edebf2d981294aa1252ce605e3032b8a6ec Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 3 Nov 2022 06:50:18 +0100 Subject: [PATCH] Improve explanation comment as to why we're waiting ourselfs --- freqtrade/rpc/api_server/ws/channel.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/rpc/api_server/ws/channel.py b/freqtrade/rpc/api_server/ws/channel.py index 3a929ac26..3c97d05b1 100644 --- a/freqtrade/rpc/api_server/ws/channel.py +++ b/freqtrade/rpc/api_server/ws/channel.py @@ -76,8 +76,9 @@ class WebSocketChannel: """ # This block only runs if the queue is full, it will wait - # until self.drain_timeout for the relay to drain the outgoing - # queue + # until self.drain_timeout for the relay to drain the outgoing queue + # We can't use asyncio.wait_for here because the queue may have been created with a + # different eventloop start = time.time() while self.queue.full(): await asyncio.sleep(1)