diff --git a/jupyter_server_documents/rooms/yroom.py b/jupyter_server_documents/rooms/yroom.py index 90271ef..7c99ec7 100644 --- a/jupyter_server_documents/rooms/yroom.py +++ b/jupyter_server_documents/rooms/yroom.py @@ -866,6 +866,9 @@ def stop(self, close_code: int = 1001, immediately: bool = False) -> None: IMPORTANT: If the server is shutting down, the YRoomManager should call `await room.until_saved`. See `until_saved` documentation for more info. """ + if self._stopped: + return + self.log.info(f"Stopping YRoom '{self.room_id}'.") # Disconnect all clients with the given close code