mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix issue When you use threading mode
This commit is contained in:
parent
41f7c07959
commit
494b535a91
@ -6,7 +6,6 @@ import time
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import six
|
import six
|
||||||
import copy
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pickle
|
import pickle
|
||||||
@ -1288,8 +1287,7 @@ class TeleBot:
|
|||||||
chat_id = message.chat.id
|
chat_id = message.chat.id
|
||||||
was_poped = False
|
was_poped = False
|
||||||
if chat_id in self.next_step_handlers.keys():
|
if chat_id in self.next_step_handlers.keys():
|
||||||
handlers = copy.deepcopy(self.next_step_handlers[chat_id])
|
handlers = self.next_step_handlers.pop(chat_id, None)
|
||||||
self.next_step_handlers.pop(chat_id, None)
|
|
||||||
if (handlers):
|
if (handlers):
|
||||||
for handler in handlers:
|
for handler in handlers:
|
||||||
self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])
|
self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])
|
||||||
|
Loading…
Reference in New Issue
Block a user