Skip to content

Pico W: Enable, use SOF_REUSEADDR #7119

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

Merged
merged 1 commit into from
Oct 26, 2022
Merged

Conversation

jepler
Copy link

@jepler jepler commented Oct 25, 2022

This is the lwip no-os version of SO_REUSEADDR, which is set on all listening sockets in the espressif port; do so here as well, it makes running servers easier. The "address in use" (OSError: [Errno 112] EADDRINUSE) error does not occur.

This is the lwip no-os version of SO_REUSEADDR, which is set on all
listening sockets in the espressif port; do so here as well,
it makes running servers easier. The "address in use" error does
not occur.
@jepler
Copy link
Author

jepler commented Oct 25, 2022

@FoamyGuy this should cure the problem you saw when testing the httpserver, which I initially discounted. when I went looking I saw that espressif was automatically setting the flag, so I did it as well

Copy link
Collaborator

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and confirmed it is able to go back to serving again after soft reset from saving a file. No more addr in use errors.

Thank you @jepler

@anecdata
Copy link
Member

@jepler would you mind adding tags or augmenting the title so it's obvious this is raspberrypi-specific?

@dhalbert dhalbert changed the title Enable, use SOF_REUSEADDR Pico W: Enable, use SOF_REUSEADDR Oct 26, 2022
@dhalbert dhalbert merged commit ca25016 into adafruit:main Oct 26, 2022
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.

4 participants