fix(driver): robust error handling, TCP task tracking, and smol runtime fixes#795
Open
nightness wants to merge 3 commits intowebrtc-rs:masterfrom
Open
fix(driver): robust error handling, TCP task tracking, and smol runtime fixes#795nightness wants to merge 3 commits intowebrtc-rs:masterfrom
nightness wants to merge 3 commits intowebrtc-rs:masterfrom
Conversation
…me fixes - fix(driver): distinguish transient vs fatal UDP socket recv errors (webrtc-rs#777) EAGAIN/EWOULDBLOCK/EINTR are re-queued; fatal errors abort and return - fix(driver): configurable mDNS socket-creation error handling New `MDNSSocketErrorHandling` enum: Log (default) or Fatal - fix(driver): track TCP task handles and abort on shutdown; add lifecycle logging Prevents task leaks on PeerConnection close - fix(driver): remove .unwrap() after guaranteed HashMap entry insert Replaced with `entry().or_insert_with()` pattern - fix(runtime/smol): eliminate lost-wakeup race and mutex-poison panic Use condvar-based wakeup instead of channel; fix Mutex unwrap on poison Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… new example entries Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 1, 2026
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.
Summary
A collection of driver and runtime robustness fixes:
EAGAIN/EWOULDBLOCK/EINTRare retried by re-queuing the recv future. Previously these caused the entire driver loop to terminate.MDNSSocketErrorHandlingenum —Log(default, silent degraded mode) orFatal(strict mode for testing). Previously any mDNS socket error terminated the connection.abort()ed onPeerConnection::close(), preventing task leaks.HashMap::insert()followed by.unwrap()replaced withentry().or_insert_with().Mutex::lock().unwrap()panic on mutex poison.rtc-shareddependency andtokio io-utilfeature required by TCP driver code.Test plan
cargo test -p webrtc— all existing tests passEAGAINerrors on UDP recv🤖 Generated with Claude Code