Skip to content

Commit

Permalink
fix: set an explicit websockets connection timeout
Browse files Browse the repository at this point in the history
Cuts it in half from the default of 10.
Closes #40
  • Loading branch information
mikejgray committed May 24, 2024
1 parent bbfa9c0 commit 3c58729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovos_PHAL_plugin_homeassistant/logic/socketclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def authenticate(self):
async def _connect(self):
try:
uri = f"{self.url}/api/websocket"
self.websocket = await websockets.connect(uri)
self.websocket = await websockets.connect(uri=uri, close_timeout=5, open_timeout=5)

# Wait for the auth_required message
message = await self.websocket.recv()
Expand Down

0 comments on commit 3c58729

Please sign in to comment.