Skip to content

Commit

Permalink
Added error 104 for resetting user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
ehendrix23 committed Aug 11, 2021
1 parent e473f1e commit 280ecb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pymyq/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ async def _send_request(
await self._get_useragent()

except ClientError as err:
if err.errno == 54 and attempt == 0:
if err.errno in (54, 104) and attempt == 0:
_LOGGER.debug(
"Received error status 54, connection reset. Will refresh user agent."
"Received error status %s, connection reset. Will refresh user agent.",
err.errno,
)
await self._get_useragent()
else:
Expand Down

0 comments on commit 280ecb9

Please sign in to comment.