From 6ec366596b57028aef136c1331b61320ec6eed0e Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 17 Oct 2024 18:55:32 +0200 Subject: [PATCH] Add hack to workaround drain cancels --- client/src/telethon/_impl/mtsender/sender.py | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/telethon/_impl/mtsender/sender.py b/client/src/telethon/_impl/mtsender/sender.py index 35dabfd1..efa93b48 100644 --- a/client/src/telethon/_impl/mtsender/sender.py +++ b/client/src/telethon/_impl/mtsender/sender.py @@ -278,6 +278,7 @@ class Sender: async def _do_send(self) -> None: if self._write_drain_pending: + self._on_net_write() await self._writer.drain() self._write_drain_pending = False else: