File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,12 @@ class YRoom:
37
37
_on_message : Callable [[bytes ], Awaitable [bool ] | bool ] | None
38
38
_update_send_stream : MemoryObjectSendStream
39
39
_update_receive_stream : MemoryObjectReceiveStream
40
- _task_group : TaskGroup | None = None
41
- _started : Event | None = None
40
+ _task_group : TaskGroup | None
41
+ _started : Event | None
42
42
_stopped : Event
43
- __start_lock : Lock | None = None
44
- _subscription : Subscription | None = None
45
-
43
+ __start_lock : Lock | None
44
+ _subscription : Subscription | None
45
+
46
46
def __init__ (
47
47
self ,
48
48
ready : bool = True ,
@@ -82,7 +82,11 @@ def __init__(
82
82
self ._on_message = None
83
83
self .exception_handler = exception_handler
84
84
self ._stopped = Event ()
85
-
85
+ self ._task_group = None
86
+ self ._started = None
87
+ self .__start_lock = None
88
+ self ._subscription = None
89
+
86
90
@property
87
91
def _start_lock (self ) -> Lock :
88
92
if self .__start_lock is None :
@@ -230,6 +234,7 @@ async def stop(self) -> None:
230
234
self ._stopped .set ()
231
235
self ._task_group .cancel_scope .cancel ()
232
236
self ._task_group = None
237
+ await self .ystore .stop ()
233
238
if self ._subscription is not None :
234
239
self .ydoc .unobserve (self ._subscription )
235
240
You can’t perform that action at this time.
0 commit comments