Skip to content

feat: add SIGINT graceful shutdown#565

Merged
Jayy4rl merged 2 commits into
StellarYield:mainfrom
Majormaxx:fix/issue-511-sigint
May 29, 2026
Merged

feat: add SIGINT graceful shutdown#565
Jayy4rl merged 2 commits into
StellarYield:mainfrom
Majormaxx:fix/issue-511-sigint

Conversation

@Majormaxx
Copy link
Copy Markdown

Summary

Handles SIGINT (Ctrl+C) the same way as the existing SIGTERM handler: stops the indexer, closes the HTTP server, and logs before exiting. A shared shutdown() function eliminates duplication between the two signal handlers.

Changes — backend/src/index.ts

  • Extracted a shutdown() function that logs "Shutting down", calls indexer.stop(), and closes the server
  • Registered shutdown for both SIGTERM and SIGINT

Changes — backend/src/api/controllers/vaults.ts

  • Fixed pre-existing lint error: renamed err_err in two unused catch variables (required for CI lint to pass)

Acceptance criteria

  • Pressing Ctrl+C logs "Shutting down" and exits cleanly
  • SIGINT handled identically to SIGTERM

Test plan

cd backend
npm run lint   # ✓ 0 errors
npm run build  # ✓ no TS errors
npm run test   # ✓ 55/55 tests pass

Closes #511

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Majormaxx Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Jayy4rl Jayy4rl merged commit ae29fe9 into StellarYield:main May 29, 2026
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.

Add SIGINT graceful shutdown

2 participants