Repository navigation
fix(signal): prevent daemon overlap during restart - #107409
Merged
Merged
Conversation
Co-authored-by: zhoukailian <[email protected]>
Contributor
Author
|
Merged via squash.
|
2 of 4 tasks
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 15, 2026
Co-authored-by: zhoukailian <[email protected]>
zooqueen
pushed a commit
to zooqueen/openclaw
that referenced
this pull request
Sep 11, 2026
Co-authored-by: zhoukailian <[email protected]>
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.
Closes #22676
What Problem This Solves
Fixes an issue where Signal users restarting or hot-reloading the gateway could start a replacement signal-cli daemon before the previous daemon released its HTTP port and config lock. That race caused orphaned processes, bind/lock failures, and failed message sends.
Why This Change Was Made
Signal daemon shutdown is now asynchronous and idempotent: it sends SIGTERM, escalates to SIGKILL after a bounded grace period, and resolves only after Node observes process exit. Signal monitor teardown stays alive until both the daemon exits and already-started reply work drains. Post-spawn signaling errors no longer masquerade as spawn failures and prematurely mark a live daemon exited.
The implementation preserves the newer readline-safe signal-cli output handling on current main and carries the original #71863 contributor as co-author.
User Impact
Signal gateway restarts no longer race the old daemon for its port or config lock. Graceful signal-cli cleanup remains preferred; stuck daemons are force-stopped before restart recovery proceeds.
Evidence