not sure abt this err

This commit is contained in:
əlemi 2021-12-17 16:41:21 +01:00
parent 890f080dbc
commit a841030c1e

View file

@ -12,7 +12,7 @@ class Runnable:
raise NotImplementedError raise NotImplementedError
async def _stop_wrapper(self): async def _stop_wrapper(self):
done, pending = await asyncio.wait(self.stop(), FORCE_QUIT.wait(), return_when=asyncio.FIRST_COMPLETED) done, pending = await asyncio.wait((self.stop(), FORCE_QUIT.wait()), return_when=asyncio.FIRST_COMPLETED)
if FORCE_QUIT.is_set(): # means previous stop() didn't finish and user sent another SIGINT if FORCE_QUIT.is_set(): # means previous stop() didn't finish and user sent another SIGINT
await self.stop(force=True) await self.stop(force=True)