Skip to content

Commit

Permalink
Merge branch 'async' into PyISY_beta
Browse files Browse the repository at this point in the history
  • Loading branch information
shbatm committed May 23, 2020
2 parents fc62206 + fb34af9 commit 6040139
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pyisy/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,14 @@ async def request(self, url, retries=0, ok404=False, delay=0):

except asyncio.TimeoutError:
raise ISYConnectionError() from None
except aiohttp.client_exceptions.ClientError as err:
except (aiohttp.ClientOSError, aiohttp.ServerDisconnectedError):
_LOGGER.debug(
"ISY not ready or closed connection. Retrying in %ss, retry #%s",
RETRY_BACKOFF[retries],
retries + 1,
)
except aiohttp.client_exceptions.ClientError as err:
_LOGGER.error(
"ISY Could not receive response "
"from device because of a network "
"issue: %s",
Expand Down

0 comments on commit 6040139

Please sign in to comment.