mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-23 06:50:29 +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
|
||||
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