We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa7b7d0 commit c7d60efCopy full SHA for c7d60ef
pyrogram/session/session.py
@@ -197,7 +197,7 @@ def stop(self):
197
for i in self.results.values():
198
i.event.set()
199
200
- if self.client and callable(self.client.disconnect_handler):
+ if not self.is_media and callable(self.client.disconnect_handler):
201
try:
202
self.client.disconnect_handler(self.client)
203
except Exception as e:
0 commit comments