Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions telegram/ext/conversationhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ def check_update(self, update):
self.logger.debug('waiting for promise...')

old_state, new_state = state
if new_state.done.wait(timeout=self.run_async_timeout):
promise_completed = new_state.done.wait(timeout=self.run_async_timeout)

if promise_completed:
try:
res = new_state.result(timeout=0)
res = res if res is not None else old_state
Expand All @@ -266,9 +268,7 @@ def check_update(self, update):
self.current_handler = candidate

return True

else:
return False
return False

self.logger.debug('selecting conversation %s with state %s' % (str(key), str(state)))

Expand Down