Fix disconnect handler callback being called on every session
This commit is contained in:
parent
fa7b7d0ce3
commit
c7d60ef8a6
@ -197,7 +197,7 @@ class Session:
|
|||||||
for i in self.results.values():
|
for i in self.results.values():
|
||||||
i.event.set()
|
i.event.set()
|
||||||
|
|
||||||
if self.client and callable(self.client.disconnect_handler):
|
if not self.is_media and callable(self.client.disconnect_handler):
|
||||||
try:
|
try:
|
||||||
self.client.disconnect_handler(self.client)
|
self.client.disconnect_handler(self.client)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user