Skip to content

Don't trust send works. Do one recv before creating Response #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 25, 2020

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Nov 24, 2020

This allows us to retry with a new socket. This greatly reduces the likelihood of Unable to read HTTP response.

@anecdata
Copy link
Member

anecdata commented Nov 24, 2020

Initial testing: seems to address the

  File "adafruit_requests.py", line 594, in get
  File "adafruit_requests.py", line 581, in request
  File "adafruit_requests.py", line 119, in __init__
RuntimeError: Unable to read HTTP response.

that has been occurring with every other GET on ESP32-S2 (with chunked responses in this case). I'll keep at it.

@tannewt tannewt requested a review from brentru November 24, 2020 23:01
Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, tested OK on ESP32SPI socket and ESP32S2 native socket.

@brentru brentru merged commit 5390215 into adafruit:master Nov 25, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants