Fix setting logout result was not checking for future cancellation

This commit is contained in:
Lonami Exo 2021-02-27 15:14:44 +01:00
parent 292a36f760
commit 4c771bf2af

View File

@ -779,7 +779,8 @@ class MTProtoSender:
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):
"""