don't set tcp_err callback for listen sockets (fixes #7790) #7813
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #7790.
There was a bug in the previous version of pico-sdk whereby
LWIP_ASSERT(message, condition)
would result in asserting thatmessage
is non-zero rather thancondition
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.