diff --git a/swarm/worker.py b/swarm/worker.py index 05520b6..3b4aed0 100644 --- a/swarm/worker.py +++ b/swarm/worker.py @@ -73,7 +73,7 @@ class WorkerManager: cookie = bot_index, self._restarts[bot_index] self.workers.add(cookie) - await sio.send("unsubscribe") + await sio.emit("unsubscribe") try: batch = 0 @@ -98,6 +98,7 @@ class WorkerManager: self.workers.remove(cookie) sio.on("connect", writer_itself) + sio.on("unsubscribed", print) await sio.connect(self.base.replace("http", "ws")) await sio.wait()