From cc4ff121035ffa605bc7aab02e409b755ed822f1 Mon Sep 17 00:00:00 2001 From: eternnoir Date: Sat, 27 Jun 2015 10:03:02 +0800 Subject: [PATCH] Change telebot polling thread to daemon. fix #2 --- telebot/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/telebot/__init__.py b/telebot/__init__.py index 8d06b8c..2c304a2 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -83,6 +83,7 @@ class TeleBot: time.sleep(interval + 1) self.__stop_polling = False self.polling_thread = threading.Thread(target=self.__polling, args=()) + self.polling_thread.daemon = True self.polling_thread.start() def __polling(self):