From 557ff002b00ac03addc67192bbf98a5864429bbd Mon Sep 17 00:00:00 2001 From: hkc Date: Sun, 7 Jul 2024 21:35:41 +0300 Subject: [PATCH] I just wanna wait somewhere else --- async-bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/async-bot.py b/async-bot.py index 44cb119..c5b4210 100644 --- a/async-bot.py +++ b/async-bot.py @@ -239,12 +239,13 @@ class AsyncBotManager: delay: float = 0.25, ): proxy = ProxyConnector.from_url(proxy_url) if proxy_url else None - await self.ready_event.wait() try: async with ClientSession(connector=proxy, timeout=TIMEOUT) as http: async with AsyncSimpleClient(http_session=http) as sio: await sio.connect(f"{self.base}/socket.io") - print(f"Writer {bot_index} connected") + print(f"Writer {bot_index} connected, waiting...") + await self.ready_event.wait() + print(f"Writer {bot_index} running") offset = 0 while not self._shutdown: diff = list(self.difference.items())