diff --git a/telethon/network/mtprotosender.py b/telethon/network/mtprotosender.py index c45e79dd..300d9707 100644 --- a/telethon/network/mtprotosender.py +++ b/telethon/network/mtprotosender.py @@ -422,6 +422,8 @@ class MTProtoSender: def _start_reconnect(self, error): """Starts a reconnection in the background.""" + if not self._auto_reconnect and error is not None: + raise error if self._user_connected and not self._reconnecting: # We set reconnecting to True here and not inside the new task # because it may happen that send/recv loop calls this again