Skip to content

Commit

Permalink
Timeout reads after 5 mins
Browse files Browse the repository at this point in the history
  • Loading branch information
filcole committed Dec 26, 2021
1 parent d2d4ad9 commit a599257
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pycarwings2/pycarwings2.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def _request(self, endpoint, params):

try:
sess = requests.Session()
response = sess.send(req, timeout=600.0)
# Nissan servers sometimes do not respond.
# Connections seem OK, but reads are slow and may not be successful
response = sess.send(req, timeout=(5.0, 600.0))
log.debug('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
log.debug('Response HTTP Response Body: {content}'.format(
Expand Down

0 comments on commit a599257

Please sign in to comment.