adafruit / adafruit/Adafruit_CircuitPython_Requests
`request()` retries fetch twice, which can cause timeouts that are twice as long as requested
- Dominant language
- Python
- Stars
- 49
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
`request()` tries twice to get a socket, connect, and fetch twice:
https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/12e6b47db7b905d2291f3f235160fcf95f7d0769/adafruit_requests.py#L513-L518
This is confusing because if it tries a second time, it can make the default or user specified timeout (see #9210) appear to take twice as long as requested.
I am not sure about the circumstances the comment is talking about:
https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/12e6b47db7b905d2291f3f235160fcf95f7d0769/adafruit_requests.py#L513
and whether it's true for non-ESP32-SPI, etc. I wonder if some checking or resetting of the socket can be done in advance.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.