Skip to content

don't set tcp_err callback for listen sockets (fixes #7790) #7813

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
Mar 29, 2023

Conversation

gneverov
Copy link

@gneverov gneverov commented Mar 29, 2023

Fixes #7790.

There was a bug in the previous version of pico-sdk whereby LWIP_ASSERT(message, condition) would result in asserting that message is non-zero rather than condition being non-zero. This was fixed in the current version, so pre-existing assert failures are actually failing now. This is one of them.

LWIP asserts that you can't set a tcp_err callback on a listen socket, and yet we were. I think this assert is more of a sanity check rather than something that guards against invalid behavior. So I think the failure of this assert was benign anyway. The fix is to move setting the tcp_err callback to socket connect instead of socket create.

Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

thank you

@dhalbert dhalbert merged commit b863fba into adafruit:main Mar 29, 2023
@gneverov gneverov deleted the issue_7790 branch November 8, 2023 03:22
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.

PicoW: System hangs when trying to restart code after starting Wifi and webserver.
3 participants