Repository navigation
Add terminate_stream_to for receivers sent data by unicast - #90
Open
stewartadam wants to merge 1 commit into
Open
stewartadam wants to merge 1 commit into
stewartadam wants to merge 1 commit into
Conversation
terminate_stream only sends the termination packets to the universe's multicast group, so a receiver that was sent the data by unicast and hasn't joined the group never sees them and only drops the source after the 2.5 s data loss timeout. terminate_stream_to sends the termination packets to each given unicast destination, then deregisters the universe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzaQVPkrkczgX2g7wGkip5
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.
Problem
SacnSource::terminate_streamalways sends its threeStream_Terminatedpackets to the universe's multicast group. If a receiver gets the universe's data by unicast and hasn't joined that group, it never sees the termination packets. It only drops the source after the 2.5 s network data loss timeout, instead of right away.Change
New
SacnSource::terminate_stream_to(universe, start_code, dst_ips: &[SocketAddr]):E131_TERMINATE_STREAM_PACKET_COUNTtermination packets to each destination, then deregisters the universe, just liketerminate_stream;terminate_stream(multicast) whendst_ipsis empty.terminate_streamand theDropcleanup are unchanged.Test
test_terminate_stream_to_reaches_unicast_receiverintests/src_tests.rssets up a unicast-only receiver, with multicast disabled so it doesn't join universe 1's group. It sends data by unicast, terminates withterminate_stream_to, and expectsUniverseTerminatedfrom the right CID. I also ran the same test withterminate_streamswapped in: the receiver times out without hearing the termination, which is the bug. All oftests/src_tests.rspasses.