1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Change telebot polling thread to daemon. fix #2

This commit is contained in:
eternnoir 2015-06-27 10:03:02 +08:00
parent a62139fafc
commit cc4ff12103

View File

@ -83,6 +83,7 @@ class TeleBot:
time.sleep(interval + 1) time.sleep(interval + 1)
self.__stop_polling = False self.__stop_polling = False
self.polling_thread = threading.Thread(target=self.__polling, args=()) self.polling_thread = threading.Thread(target=self.__polling, args=())
self.polling_thread.daemon = True
self.polling_thread.start() self.polling_thread.start()
def __polling(self): def __polling(self):