diff --git a/jupyter_collaboration/rooms.py b/jupyter_collaboration/rooms.py index 1aa9fe65..4cb85f66 100644 --- a/jupyter_collaboration/rooms.py +++ b/jupyter_collaboration/rooms.py @@ -249,8 +249,7 @@ async def _maybe_save_document(self) -> None: # do not write to `self._document` in this `try` block, as that will # trigger the observer and result in a save loop. self.log.info("Saving the content from room %s", self._room_id) - loop = asyncio.get_running_loop() - self._save_task = loop.create_task(self._file.maybe_save_content( + self._save_task = asyncio.create_task(self._file.maybe_save_content( { "format": self._file_format, "type": self._file_type,