File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 66
77from __future__ import annotations
88
9- from asyncio import get_running_loop
9+ from asyncio import create_task , get_running_loop
1010from collections .abc import Callable , Coroutine
1111from functools import wraps
1212import logging
@@ -198,12 +198,15 @@ def accept_join_request(self, state: bool) -> None:
198198 "Cannot accept joining node"
199199 + " without an active USB-Stick connection."
200200 )
201+
201202 if self ._network is None or not self ._network .is_running :
202203 raise StickError (
203204 "Cannot accept joining node"
204205 + "without node discovery be activated. Call discover() first."
205206 )
207+
206208 self ._network .accept_join_request = state
209+ _ = create_task (self ._network .allow_join_requests (state ))
207210
208211 async def clear_cache (self ) -> None :
209212 """Clear current cache."""
@@ -362,3 +365,4 @@ async def disconnect(self) -> None:
362365 if self ._network is not None :
363366 await self ._network .stop ()
364367 await self ._controller .disconnect_from_stick ()
368+
You can’t perform that action at this time.
0 commit comments