From 140a8b4e12e4c693e11c1095fa34561e343d4c31 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 21 Feb 2018 13:35:17 +0100 Subject: [PATCH] Catch RPCError in InitConnection --- pyrogram/session/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index 8978b4de..7dd0cba4 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -145,7 +145,7 @@ class Session: self.ping_thread.start() log.info("Connection inited: Layer {}".format(layer)) - except (OSError, TimeoutError): + except (OSError, TimeoutError, Error): self.stop() else: break