From 1ff348adbbf924fe16a712c7b6a3499d1b329e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Tue, 31 May 2016 13:47:43 +0200 Subject: [PATCH] issue warning if connection pool was initialized before Dispatcher --- telegram/ext/dispatcher.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/telegram/ext/dispatcher.py b/telegram/ext/dispatcher.py index fd6fc58c3..bd4151721 100644 --- a/telegram/ext/dispatcher.py +++ b/telegram/ext/dispatcher.py @@ -109,6 +109,8 @@ class Dispatcher(object): self.__exception_event = exception_event or Event() if not len(async_threads): + if request._CON_POOL: + self.logger.warning("Connection Pool already initialized!") request.CON_POOL_SIZE = workers + 3 for i in range(workers): thread = Thread(target=pooled, name=str(i))