You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes the semantics of socket reuse as it is in CPython. One would need to use socket.setsockopt(pool.SOL_SOCKET, pool.SO_REUSEADDR, 1) in the same cases one would use it in CPython.
HTTPServer maintainers: Is this a breaking change for use of adafruit_httpserver or for the examples? Thanks for looking.
The text was updated successfully, but these errors were encountered:
Tested on ESP32-S2 with lates adafruit_httpserver and CP 9.0.0-beta.1.
Indeed starting the server, Ctrl-C'ing and Ctrl-D'ing results in EADDRINUSE. Modyfying code lib code so it calls the line you provided solves the problem.
Changing the port to different one and re-launching the code works too, but this is more of a hack than solution.
One thing I noticed is that the error is also present when trying to use port 80, probably because web workflow uses it too. It was possible to use this port before, so examples would have to be cahnged to use e.g. 8000. I can change them and add note to docs about this behaviour.
CircuitPython 9.0.0-beta.1 will include this PR:
This makes the semantics of socket reuse as it is in CPython. One would need to use
socket.setsockopt(pool.SOL_SOCKET, pool.SO_REUSEADDR, 1)
in the same cases one would use it in CPython.HTTPServer maintainers: Is this a breaking change for use of
adafruit_httpserver
or for the examples? Thanks for looking.The text was updated successfully, but these errors were encountered: