Skip to content

daemon client reliability#438

Merged
astronomerdave merged 5 commits into
mainfrom
hotfix/bob
May 20, 2026
Merged

daemon client reliability#438
astronomerdave merged 5 commits into
mainfrom
hotfix/bob

Conversation

@astronomerdave
Copy link
Copy Markdown
Contributor

fix: sequencerd sending commands to camerad
add a correlation ID to inter-daemon messages
DaemonClient::send retries only on stale fd
increase timeout for camerad activate command

@astronomerdave astronomerdave requested review from prkrtg and scizen9 May 19, 2026 12:15
…ble abort

Three bugs in the slicecam/acam startup retry loops and DaemonClient::send:

sequence.cpp — slicecam_init and acam_init retry loops:
- Missing break in the else (exceeded-max-attempts) branch caused
  attempt <= maxattempts (3 <= 3) to remain true forever, spinning
  indefinitely through power-on and connect cycles.
- No disconnect() in that branch left the socket open to a busy
  slicecamd; subsequent connect_to_daemon() calls skipped reconnect
  because isconnected() was still true, allowing delayed replies from
  the previous timed-out open command to accumulate in the receive buffer.
- No cancel_flag check anywhere in either loop meant abort_process()
  could not interrupt a stuck startup.

common.cpp — DaemonClient::send():
- On CID mismatch, drain the socket receive buffer with Poll(0) before
  returning ERROR so stale replies cannot bleed into the next send() call,
  independent of whether the caller reconnects.
@astronomerdave astronomerdave merged commit fb71cb0 into main May 20, 2026
2 checks passed
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