Open mostafa-v opened 7 years ago
here is the code of release method in my custom subscriber class:
def release(self):
if self._subscription and self._subscription.subscribed:
self._subscription.unsubscribe()
if self._publishers:
message = RedisMessage('Bye')
self.publish_message(message)
# I want to close all sockets here
else:
self.send_viewers_count()
self._subscription.reset()
(publisher is a subscriber too, but there is only one publisher)
In my architecture, there is one publisher and many subscribers in a broadcast channel. I want to close all subscribers' sockets when the publisher closes its socket. how can I handle this? how can I close all sockets to a channel in server side code?