mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix #481
This commit is contained in:
parent
dadcd5a577
commit
7f47f11444
@ -302,9 +302,9 @@ class TeleBot:
|
||||
except KeyboardInterrupt:
|
||||
logger.info("KeyboardInterrupt received.")
|
||||
self.__stop_polling.set()
|
||||
polling_thread.stop()
|
||||
break
|
||||
|
||||
polling_thread.stop()
|
||||
logger.info('Stopped polling.')
|
||||
|
||||
def __non_threaded_polling(self, none_stop=False, interval=0, timeout=3):
|
||||
@ -341,6 +341,11 @@ class TeleBot:
|
||||
def stop_polling(self):
|
||||
self.__stop_polling.set()
|
||||
|
||||
def stop_bot(self):
|
||||
self.stop_polling()
|
||||
if self.worker_pool:
|
||||
self.worker_pool.close()
|
||||
|
||||
def set_update_listener(self, listener):
|
||||
self.update_listener.append(listener)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user