diff --git a/pyvlx/api/api_event.py b/pyvlx/api/api_event.py index c21a36c1..fea21db3 100644 --- a/pyvlx/api/api_event.py +++ b/pyvlx/api/api_event.py @@ -28,7 +28,7 @@ async def do_api_call(self) -> None: # the semaphore. await self.pyvlx.check_connected() - async with self.pyvlx.sem: + async with self.pyvlx.api_call_semaphore: self.pyvlx.connection.register_frame_received_cb(self.response_rec_callback) await self.send_frame() await self.start_timeout() diff --git a/pyvlx/pyvlx.py b/pyvlx/pyvlx.py index 1a17b9ae..1625a2c7 100644 --- a/pyvlx/pyvlx.py +++ b/pyvlx/pyvlx.py @@ -41,7 +41,7 @@ def __init__(self, self.version = None self.protocol_version = None self.klf200 = Klf200Gateway(pyvlx=self) - self.sem = asyncio.Semaphore(1) # Limit parallel commands + self.api_call_semaphore = asyncio.Semaphore(1) # Limit parallel commands async def connect(self) -> None: """Connect to KLF 200."""