-
Notifications
You must be signed in to change notification settings - Fork 35
Error condition when the connection will be closed by the server while reading the response #25
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
Comments
When looking at the implementation of the To make the GC actually free heap memory, you probably also added
That would even not be unlikely as I see So, I am humbly asking if just setting these two instance attributes to If nothing speaks against this, I would like to vote to change this in order to make the library more robust - even in error conditions and unforeseen bogus usage. [1] https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/v1.1.0/adafruit_requests.py#L94-L100 |
Hi @amotl! Please make a pull request with your suggested changes. This code is relatively new and evolving so we're happy to merge them in. Let us know if you need help getting it going. |
Dear Scott, thanks for your quick answer.
We have not been able to make this switchover yet. In the meanwhile, we fixed the As soon as we might be going towards using With kind regards, P.S.: The background of our current work is that we are conceiving a powerful CPython- and
From investigating the source code of this module, I definitively have a few remarks about compatibility with CPython and Genuine MicroPython. However, I will open another issue about that in order not to hijack this one. [1] https://github.com/hiveeyes/terkin-datalogger/tree/master/test |
Hi there, thanks for putting more efforts into this implementation. I can now see that after f32426d and e372574 on behalf of #31 by @tannewt,
is only made at the end of the Keep up the spirit and with kind regards, |
Dear people of Adafruit,
thanks a bunch for taking over from
urequests
and giving that baseline implementation so much love within yourAdafruit_CircuitPython_Requests
module. We are about to switch over to your implementation within our Terkin Datalogger.It came to our attention that the baseline implementation might suffer from a minor issue manifesting in a specific error condition. The user kjm reported on the Pycom user forum at [1] that when the server would close the connection while reading the socket, the module will croak like
within the
Response.content()
method [2]. That will also apply to this implementation. So, I would like to suggest to replace the two lines [3] with justself.close()
.With kind regards,
Andreas.
[1] https://forum.pycom.io/topic/5755/micropython-error-trail-confusing-me
[2] https://github.com/micropython/micropython-lib/blob/829f53dc9ea633f3a906cc078027fe7c5248b04e/urequests/urequests.py#L16-L24
[3] https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/v1.1.0/adafruit_requests.py#L115-L116
The text was updated successfully, but these errors were encountered: