Skip to content
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

Fixed infinite loop when socket readline fails #42

Merged
merged 2 commits into from
May 25, 2019
Merged

Fixed infinite loop when socket readline fails #42

merged 2 commits into from
May 25, 2019

Conversation

ZachNo
Copy link
Contributor

@ZachNo ZachNo commented May 5, 2019

In certain cases, the socket may not receive a full response (or any
response), causing the while loop in readline to go on forever. After
failing to receive any data, this fix will raise an exception and fail
out.

Mitigates #11

@ladyada
Copy link
Member

ladyada commented May 5, 2019

looks good! we prefer a time-based timeout with time.monotonic() because retries # is harder to gauge, can you adjust it?

In certain cases, the socket may not receive a full response (or any
response), causing the while loop in readline to go on forever. After
failing to receive any data, this fix will raise an exception and fail
out.
Co-Authored-By: Craig <cpforbes@starlake.org>
@ladyada ladyada merged commit ac4aee5 into adafruit:master May 25, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 28, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_BD3491FS to 1.0.3 from 1.0.1:
  > once more with gusto

Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 1.3.8 from 1.3.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#42 from ZachNo/socket_hang_fix
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#44 from cpforbes/socket_timeout
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#40 from cpforbes/wifi_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_INA260 to 1.1.2 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_INA260#5 from siddacious/blinka_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_BD3491FS
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