mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 22:45:09 +01:00
exit immediately if receiving second interrupt #224
This commit is contained in:
parent
cb99341848
commit
0d9d5032ef
1 changed files with 6 additions and 1 deletions
|
@ -388,7 +388,12 @@ class Updater(object):
|
|||
|
||||
def signal_handler(self, signum, frame):
|
||||
self.is_idle = False
|
||||
self.stop()
|
||||
if self.running:
|
||||
self.stop()
|
||||
else:
|
||||
self.logger.warning('Exiting immediately!')
|
||||
import os
|
||||
os._exit(1)
|
||||
|
||||
def idle(self, stop_signals=(SIGINT, SIGTERM, SIGABRT)):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue