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

Atm_esp8266_httpc_simple gets stuck if server keep-alives connection #4

Open
euphi opened this issue Dec 9, 2017 · 0 comments
Open

Comments

@euphi
Copy link
Contributor

euphi commented Dec 9, 2017

The http client gets stuck till timeout if the server does not close the connection when the request has finished.
Most (?) server (at least my default nginx) keep-alive the connection to wait for other http requests.

I have no real experience with http, so I don't know if there is a easy way to disable keep-alive from clientside. My solution/workaround: Close the connection, if the answer from server looks "finished", e.g. it ends with "".

Add in line 90 of Atm_esp8266_httpc_simple.cpp:

      if (response_data.endsWith("</html>\r\n")) client.stop();
tinkerspy added a commit that referenced this issue Jan 8, 2020
Fix timeout and keep-alive behaviour of http-client (Fix #3 and #4)
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

No branches or pull requests

1 participant