Skip to content

fix: use control-socket-only check for daemon teardown on async disable#805

Merged
svarlamov merged 1 commit intomainfrom
fix/teardown-daemon-control-socket-only
Mar 26, 2026
Merged

fix: use control-socket-only check for daemon teardown on async disable#805
svarlamov merged 1 commit intomainfrom
fix/teardown-daemon-control-socket-only

Conversation

@svarlamov
Copy link
Member

@svarlamov svarlamov commented Mar 26, 2026

Summary

  • maybe_teardown_async_mode used daemon_is_up() to decide whether to send a shutdown, but that helper requires both the control and trace sockets to be connectable
  • If the trace socket was down while the control socket was still up, the shutdown was silently skipped and the daemon process lingered
  • Replaced with a direct control-socket-only connectivity check, matching the behavior of git-ai d shutdown which worked fine in the same scenario

Test plan

  • Disable async mode while daemon is running, run install-hooks, verify daemon is shut down
  • Verify install-hooks still works normally with async mode enabled (daemon restart path unaffected)
  • Verify install-hooks --dry-run skips teardown as before

🤖 Generated with Claude Code


Open with Devin

maybe_teardown_async_mode used daemon_is_up() which requires both the
control AND trace sockets to be connectable. If the trace socket was
down but the control socket was still up, the shutdown was silently
skipped and the daemon process lingered. Use a direct control socket
connectivity check instead, matching the behavior of `git-ai d shutdown`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@svarlamov svarlamov merged commit bc4ccfe into main Mar 26, 2026
21 checks passed
@svarlamov svarlamov deleted the fix/teardown-daemon-control-socket-only branch March 26, 2026 04:06
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.

1 participant