From 500b8f7adc2cfe2322773396149c4618be177010 Mon Sep 17 00:00:00 2001 From: Wh1isper <9573586@qq.com> Date: Mon, 28 Nov 2022 16:39:40 +0800 Subject: [PATCH] fix clean room (#250) --- plugins/yjs/fps_yjs/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/yjs/fps_yjs/routes.py b/plugins/yjs/fps_yjs/routes.py index 4afcfbea..f5fa4b51 100644 --- a/plugins/yjs/fps_yjs/routes.py +++ b/plugins/yjs/fps_yjs/routes.py @@ -191,7 +191,7 @@ async def serve(self): self.room.document.observe(self.on_document_change) await self.websocket_server.serve(self.websocket) - if not self.room.is_transient and self.room.clients == [self.websocket]: + if not self.room.is_transient and not self.room.clients: # no client in this room after we disconnect # keep the document for a while in case someone reconnects self.room.cleaner = asyncio.create_task(self.clean_room())