Repository navigation
Bind NetworkReceive's ports again when a rebuild prepares it twice - #226
AnjinMeili wants to merge 1 commit into
Conversation
A rebuild that prepares the effect again without a release reported its own ports as in use and stopped receiving. It now closes its three sockets before binding them. **Light domain** - NetworkReceiveEffect.h: prepare() closes the Art-Net, E1.31 and DDP sockets before opening and binding them. **Tests** - unit_NetworkReceiveEffect_protocols: binds its ports again on a second prepare. - test_desktop: 2,875 passed on macOS and the Pi 5 (whole branch). - Scenarios skipped: no per-frame change for an RGB wiring; NetworkReceive changed only in prepare. **Docs/CI** - check_prose: NegatedHeading 6 to 8 and SelfReference 16 to 17 are main's baseline: the committed tree measures the same with this change absent. **Reviews** - none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the change addressing reception loss after repeated prepare() calls.
No open issues 🎉
What changed in this PR
Fixes NetworkReceive stopping reception when a rebuild calls prepare() twice without an intervening release.
Changes:
- Closes the Art-Net, E1.31, and DDP sockets before reopening and binding them.
- Adds a regression test checking that a second
prepare()succeeds without reporting a bind error.
| File | Description |
|---|---|
test/unit/light/unit_NetworkReceiveEffect_protocols.cpp |
Adds a repeated-prepare regression test using a heap-allocated rig. |
src/light/effects/NetworkReceiveEffect.h |
Closes all three receive sockets before rebinding during preparation. |
Review effort: Balanced
A rebuild that prepares the effect again without a release reported its own ports as in use and stopped receiving. It now closes its three sockets before binding them.
Light domain
Tests
Docs/CI
Reviews
What an agent wrote: Claude Code (Opus) wrote the code, the tests and this text from my direction; I reviewed every line and vouch for it.
Tested: On this branch on macOS, 2849 of 2850 desktop tests pass, the new test among them; the one failure is main's discovery test injecting a WLED from 192.168.1.186, which this Mac holds, the bug #225 fixes. Found on a Raspberry Pi 5, where a rebuild left the receiver reporting its own ports in use.
check_coderan on this branch before the push.Skipped checks:
🤖 Generated with Claude Code