Repository navigation
Conversation
|
Code size report: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19708 +/- ##
=======================================
Coverage 98.55% 98.55%
=======================================
Files 182 182
Lines 23335 23335
Branches 5 5
=======================================
Hits 22998 22998
Misses 336 336
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tcp_sndbuf counts bytes, so it can report room while the segment or heap pool is exhausted and tcp_write returns ERR_MEM. lwip_tcp_send then waited in its retry loop for up to 10 seconds even for a non-blocking socket, stalling a single-threaded event loop. Nothing is queued on ERR_MEM, so a non-blocking socket can return EAGAIN there, as it already does when tcp_sndbuf is 0. Blocking sockets are unchanged. Fixes issue micropython#19704. Signed-off-by: Tejas Nagmote <[email protected]>
devtejasx
force-pushed
the
modlwip-nonblocking-send-enomem
branch
from
September 18, 2026 14:17
55f8e62 to
a4cc2b0
Compare
Member
|
See #19705. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
tcp_sndbuf counts bytes, so it can report room while the segment or heap pool is exhausted and tcp_write returns ERR_MEM. lwip_tcp_send then waited in its retry loop for up to 10 seconds even for a non-blocking socket, stalling a single-threaded event loop.
Nothing is queued on ERR_MEM, so a non-blocking socket can return EAGAIN there, as it already does when tcp_sndbuf is 0. Blocking sockets are unchanged.
Fixes issue #19704.
Summary
Testing
Trade-offs and Alternatives
Generative AI
I did not use generative AI tools when creating this PR.
I used generative AI tools when creating this PR, but a human has checked the
code and is responsible for the code and the description above.