From eda2512f0f171af194d229c016a255d1aff46b9a Mon Sep 17 00:00:00 2001 From: "andrew (from workstation)" Date: Tue, 5 Nov 2019 19:56:24 +0100 Subject: [PATCH] next_delay fix conversion --- tasks/mtproto_task_abstraction.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/mtproto_task_abstraction.py b/tasks/mtproto_task_abstraction.py index e959671..b5eb43c 100644 --- a/tasks/mtproto_task_abstraction.py +++ b/tasks/mtproto_task_abstraction.py @@ -17,7 +17,13 @@ class MtProtoTask(AsyncTask, abc.ABC): async def _process(self) -> typing.Union[bool, int]: try: - return await self.process() * 1e9 + + result = await self.process() + + if result is False: + return False + + return result * 1e9 except FloodWait as error: return int(error.MESSAGE.split("_")[-1]) * 1e9