Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions telethon/network/mtprotosender.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ async def _reconnect(self, last_error):

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
Expand Down