Skip to content

Return an error when the source socket can't be created - #82

Merged
stewartadam merged 1 commit into
mainfrom
claude/project-thread-0t11p6-2-socket-new-error
Nov 12, 2026
Merged

stewartadam merged 1 commit into
mainfrom
claude/project-thread-0t11p6-2-socket-new-error

Conversation

@stewartadam

@stewartadam stewartadam commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

SacnSourceInternal::with_cid_ip called Socket::new(...).unwrap(), so creating a SacnSource panicked when the OS refused the socket, for example when IPv6 is unavailable or the process is out of file descriptors. The function's docs already say it returns an Io error in that case. This replaces both unwrap() calls with ?.

There's no regression test, because making socket(2) fail on demand would need fault injection. The rest of the constructor already propagates errors the same way.

Socket::new was unwrapped, so SacnSource construction panicked instead of
returning the Io error its docs promise, for example when IPv6 is
unavailable or the process is out of file descriptors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KzaQVPkrkczgX2g7wGkip5
@stewartadam stewartadam self-assigned this Nov 12, 2026
@stewartadam
stewartadam merged commit d91de49 into main Nov 12, 2026
4 checks passed
@stewartadam
stewartadam deleted the claude/project-thread-0t11p6-2-socket-new-error branch November 12, 2026 09:49
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.

2 participants