Skip to content

Commit 91cb465

Browse files
committed
Handle async function-call properly
1 parent 010c1dd commit 91cb465

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugwise_usb/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from __future__ import annotations
88

9-
from asyncio import get_running_loop
9+
from asyncio import create_task, get_running_loop
1010
from collections.abc import Callable, Coroutine
1111
from functools import wraps
1212
import logging
@@ -206,7 +206,7 @@ def accept_join_request(self, state: bool) -> None:
206206
)
207207

208208
self._network.accept_join_request = state
209-
self._network.allow_join_requests(state)
209+
create_task(self._network.allow_join_requests(state))
210210

211211
async def clear_cache(self) -> None:
212212
"""Clear current cache."""

0 commit comments

Comments
 (0)