From 62a52679f4e3aa86113ae6565adaa48985f61cb0 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 3 Sep 2017 13:45:13 +0200 Subject: [PATCH] Ensure the state of the requests is clean before invoking them --- telethon/telegram_bare_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/telethon/telegram_bare_client.py b/telethon/telegram_bare_client.py index 21682bbe..46c878ca 100644 --- a/telethon/telegram_bare_client.py +++ b/telethon/telegram_bare_client.py @@ -304,6 +304,10 @@ class TelegramBareClient: raise ValueError('You must be connected to invoke requests!') try: + # Ensure that we start with no previous errors (i.e. resending) + request.confirm_received.clear() + request.rpc_error = None + self._sender.send(request) if not call_receive: # TODO This will be slightly troublesome if we allow