Skip to content

Commit

Permalink
Rename semaphore to api_call_semaphore
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Nov 26, 2023
1 parent 82639d7 commit d25c6de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyvlx/api/api_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion pyvlx/pyvlx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit d25c6de

Please sign in to comment.