Skip to content

Fix failure to close listening socket (#3678). #3679

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

Conversation

jmattsson
Copy link
Member

Fixes #3678

  • This PR is for the dev branch rather than for the release branch.
  • This PR is compliant with the other contributing guidelines as well (if not, please describe why).
  • I have thoroughly tested my contribution.
  • The code changes are reflected in the documentation at docs/*.

The IDF LWIP's netconn_close() no longer returns valid error codes as the #ifdef'd code path the IDF uses does not end up actually doing much, which unfortunately includes actually setting the error code. As such, checking the return code is actively harmful to proper operation for us. The fix here is simply to carry on with the netconn_delete(). This should be safe even if netconn_close() actually errored.

Copy link
Member

@marcelstoer marcelstoer left a comment

Choose a reason for hiding this comment

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

I haven't tested it but the change looks sane given the explanations. Thanks a lot!

@marcelstoer marcelstoer merged commit 4478fe8 into nodemcu:dev-esp32 Mar 22, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants