Skip to content

Give the multicast receiver a start timeout from mcastMaxWait - #193

Merged
mastacontrola merged 1 commit into
masterfrom
fix/mc-receiver-start-timeout
Oct 19, 2026
Merged

mastacontrola merged 1 commit into
masterfrom
fix/mc-receiver-start-timeout

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Fixes #48

Problem: udp-receiver ran with no --start-timeout. A host that booted after its sender started, or after the sender gave up, waited forever. FOS ignored the mcastMaxWait value the server sends.

Change:

  • New mcStartTimeout() in funcs.sh. For a positive integer mcastMaxWait it prints max(mcastMaxWait*60, 600) + 120 seconds. That outlasts the sender's wait for the first and for later streams. For an absent, zero, or non-numeric value it prints nothing, so older servers keep today's behavior.
  • Both udp-receiver call sites in writeImage() pass --start-timeout when it is set.
  • checkStreamIdentity() reports "No multicast sender answered on port N within S seconds" on an empty read. It used to report a stream mismatch against ''. The legacy path already fails through partclone and handleError.
  • New tests/checks/multicast-receiver.sh. Each assertion was made to fail by reverting the defect. multicast-stream-identity.sh has one grep updated for the new call line.

Not verified on real hardware or against a live sender.

🤖 Generated with Claude Code

udp-receiver ran with no --start-timeout, so a host that booted after its
sender started or gave up waited forever. When the server sends a positive
integer mcastMaxWait, both receiver call sites now get
--start-timeout max(mcastMaxWait*60, 600)+120, which outlasts the sender's
own wait for any stream. Without mcastMaxWait the flag is omitted.

An empty read in checkStreamIdentity now reports that no sender answered,
instead of a stream mismatch against ''.

Fixes #48

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mastacontrola
mastacontrola merged commit 65cf610 into master Oct 19, 2026
1 check passed
@mastacontrola
mastacontrola deleted the fix/mc-receiver-start-timeout branch October 19, 2026 14:34
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.

Multicast: udp-receiver waits forever when no sender answers (mcastMaxWait ignored)

1 participant