Skip to content

Commit

Permalink
fix ystore start flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jialin Zhang committed May 2, 2024
1 parent aa48250 commit 1ba5059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycrdt_websocket/ystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ async def start(
task_status: The status to set when the task has started.
"""

self.db_initialized = Event()
if from_context_manager:
assert self._task_group is not None
self._task_group.start_soon(self._init_db)
Expand All @@ -364,6 +363,7 @@ async def stop(self) -> None:
if self.db_initialized.is_set():
await self._db.close()
await super().stop()
self.db_initialized = Event()

async def _init_db(self):
create_db = False
Expand Down

0 comments on commit 1ba5059

Please sign in to comment.