From 4dbf1ef5ac0e8826ee7d0dccddcf276dc9ac071d Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 16 Mar 2018 11:18:16 +0100 Subject: [PATCH] Improve re-connection speed --- pyrogram/session/session.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py index c1269d49..333947e4 100644 --- a/pyrogram/session/session.py +++ b/pyrogram/session/session.py @@ -186,6 +186,9 @@ class Session: for i in range(self.NET_WORKERS): self.recv_queue.put(None) + for i in self.results.values(): + i.event.set() + log.debug("Session stopped") def restart(self):