From f52ea635e5fd9d8c74699b267cf4f3b7dabd36c0 Mon Sep 17 00:00:00 2001 From: Badiboy Date: Tue, 13 Jul 2021 22:09:56 +0300 Subject: [PATCH] Fix worker_pool issue --- telebot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index ecaf438..faf1baa 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -740,7 +740,7 @@ class TeleBot: def stop_bot(self): self.stop_polling() - if self.worker_pool: + if self.threaded and self.worker_pool: self.worker_pool.close() def set_update_listener(self, listener):