mirror of https://github.com/coddrago/Heroku
Merge pull request #146 from ZetGoHack/dev-test
[+] fix: SIGINT now says 'bye!' only once
commit
032e2b5ad2
|
@ -988,7 +988,6 @@ class Heroku:
|
||||||
for task in asyncio.all_tasks():
|
for task in asyncio.all_tasks():
|
||||||
if task is not asyncio.current_task():
|
if task is not asyncio.current_task():
|
||||||
task.cancel()
|
task.cancel()
|
||||||
logging.info("Bye!")
|
|
||||||
self.loop.stop()
|
self.loop.stop()
|
||||||
|
|
||||||
def main(self):
|
def main(self):
|
||||||
|
@ -1002,6 +1001,7 @@ class Heroku:
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
|
logging.info("Bye!")
|
||||||
self.loop.run_until_complete(self._shutdown_handler())
|
self.loop.run_until_complete(self._shutdown_handler())
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue