From 552474a0e2314b13e28c212de585aca668f0fbfb Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 12 Apr 2018 08:30:52 +0200 Subject: [PATCH] Raise any other unknown exception --- pyrogram/session/session.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index 72939491..42b72371 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -159,6 +159,9 @@ class Session: log.info("Connection inited: Layer {}".format(layer)) except (OSError, TimeoutError, Error): self.stop() + except Exception as e: + self.stop() + raise e else: break