next_delay fix conversion
This commit is contained in:
parent
eaba19a078
commit
eda2512f0f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user