Skip to content

Commit

Permalink
fix clean room (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wh1isper authored Nov 28, 2022
1 parent 1c71f80 commit 500b8f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/yjs/fps_yjs/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 500b8f7

Please sign in to comment.