From 775cbb568f2a1f4faee6abb85c69dbf82148b887 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 14 Jun 2018 03:27:30 +0200 Subject: [PATCH] Small fixes --- pyrogram/session/session.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index ba0013cc..30d4412d 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -286,8 +286,7 @@ class Session: await asyncio.wait_for(self.ping_task_event.wait(), self.PING_INTERVAL) except asyncio.TimeoutError: pass - - if self.ping_task_event.is_set(): + else: break try: @@ -320,8 +319,7 @@ class Session: await asyncio.wait_for(self.next_salt_task_event.wait(), dt) except asyncio.TimeoutError: pass - - if self.next_salt_task_event.is_set(): + else: break try: