Skip to content

Conversation

@bougyman
Copy link
Member

In certain contexts (rails runner) a SIGINT was somehow
not stopping the service completely. It would stop,
then wake the main thread, and start right back up.

This ensures an explicit exit.

Copilot AI review requested due to automatic review settings August 15, 2025 18:50
@bougyman bougyman added the bug Something isn't working label Aug 15, 2025
@bougyman bougyman self-assigned this Aug 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where a SIGINT signal wasn't completely stopping the service in certain contexts like Rails runner, causing the service to restart after shutdown. The fix ensures the process explicitly exits after the shutdown procedure completes.

  • Renamed wake_main_thread to wake_main_thread_and_exit! to reflect its new behavior
  • Added explicit exit call in an ensure block to guarantee process termination

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@bougyman bougyman merged commit 11a7584 into main Aug 15, 2025
4 checks passed
@bougyman bougyman deleted the ensure-we-exit-after-draining branch August 15, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants