Ensure the state of the requests is clean before invoking them

This commit is contained in:
Lonami Exo 2017-09-03 13:45:13 +02:00
parent 27408b46da
commit 62a52679f4

View File

@ -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