Skip to content

Commit

Permalink
Merge pull request #60 from noahhusby/refact/subscribe-model
Browse files Browse the repository at this point in the history
Add timeout to async open connection
  • Loading branch information
noahhusby authored Sep 25, 2024
2 parents d83c85a + 6880d5f commit da8bd7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion aiorussound/rio.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ async def _connect_handler(self, res):
handler_tasks = set()
try:
self._do_state_update = False
await self.connection_handler.connect()
async with asyncio.timeout(TIMEOUT):
await self.connection_handler.connect()
handler_tasks.add(
asyncio.create_task(self.consumer_handler(self.connection_handler))
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiorussound"
version = "4.0.4"
version = "4.0.5"
description = "Asyncio client for Russound RIO devices."
authors = ["Noah Husby <[email protected]>"]
maintainers = ["Noah Husby <[email protected]>"]
Expand Down

0 comments on commit da8bd7a

Please sign in to comment.