Skip to content

Commit

Permalink
check lock
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveicedgreentea committed Jan 14, 2023
1 parent 76cad1c commit 68e3c5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions madvr/madvr.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ def poll_status(self) -> None:
"""
Poll the status for attributes and write them to state
"""
# If its locked, return
if not self._lock.acquire(blocking=False): # pylint: disable=consider-using-with
return

# lock so HA doesn't trip over itself
with self._lock:
try:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="py_madvr",
version="1.1.1",
version="1.1.2",
author="iloveicedgreentea",
description="A package to control MadVR Envy over IP",
long_description=long_description,
Expand Down

0 comments on commit 68e3c5c

Please sign in to comment.