Skip to content

Commit

Permalink
Fix setting logout result was not checking for future cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonami committed Feb 27, 2021
1 parent 292a36f commit 4c771bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion telethon/network/mtprotosender.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,8 @@ async def _handle_ack(self, message):
state = self._pending_state.get(msg_id)
if state and isinstance(state.request, LogOutRequest):
del self._pending_state[msg_id]
state.future.set_result(True)
if not state.future.cancelled():
state.future.set_result(True)

async def _handle_future_salts(self, message):
"""
Expand Down

0 comments on commit 4c771bf

Please sign in to comment.