mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 23:27:49 +01:00
Merge pull request #240 from python-telegram-bot/os_exit
exit immediately if receiving second interrupt #224
This commit is contained in:
commit
b40a59f509
1 changed files with 6 additions and 1 deletions
|
@ -388,7 +388,12 @@ class Updater(object):
|
||||||
|
|
||||||
def signal_handler(self, signum, frame):
|
def signal_handler(self, signum, frame):
|
||||||
self.is_idle = False
|
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)):
|
def idle(self, stop_signals=(SIGINT, SIGTERM, SIGABRT)):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue