From a30411c9fae8270008a2be03025cf4745d9ad9e1 Mon Sep 17 00:00:00 2001 From: Noam Meltzer Date: Fri, 17 Jun 2016 23:58:22 +0300 Subject: [PATCH] make sure to remove the stopped dispatcher threads from ASYNC_THREADS --- telegram/ext/updater.py | 1 + 1 file changed, 1 insertion(+) diff --git a/telegram/ext/updater.py b/telegram/ext/updater.py index 7fb19c569..420763e87 100644 --- a/telegram/ext/updater.py +++ b/telegram/ext/updater.py @@ -382,6 +382,7 @@ class Updater(object): for i, thr in enumerate(threads): self.logger.debug('Waiting for async thread {0}/{1} to end'.format(i + 1, total)) thr.join() + dispatcher.ASYNC_THREADS.remove(thr) self.logger.debug('async thread {0}/{1} has ended'.format(i + 1, total)) def _join_threads(self):