Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove process.exit() Usage #12

Closed
wants to merge 1 commit into from
Closed

Conversation

fine-ai[bot]
Copy link

@fine-ai fine-ai bot commented Feb 10, 2025

Implement graceful server shutdown in server.js

- Replaced the existing shutdown function with a more robust implementation.
- The new shutdown function:
  1. Waits for the server to close existing connections before exiting.
  2. Implements a 10-second timeout to force shutdown if the server takes too long.
  3. Uses `process.exitCode` to set the exit code instead of calling `process.exit()` directly.
- This ensures a cleaner and more predictable shutdown process.

```
Implement graceful server shutdown in server.js

- Replaced the existing shutdown function with a more robust implementation.
- The new shutdown function:
  1. Waits for the server to close existing connections before exiting.
  2. Implements a 10-second timeout to force shutdown if the server takes too long.
  3. Uses `process.exitCode` to set the exit code instead of calling `process.exit()` directly.
- This ensures a cleaner and more predictable shutdown process.
```
Copy link
Contributor

deepsource-io bot commented Feb 10, 2025

Here's the code health analysis summary for commits bc03a25..b900c5c. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript❌ Failure
❗ 1 occurence introduced
🎯 1 occurence resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@browser-vm browser-vm marked this pull request as ready for review February 10, 2025 14:47
@browser-vm browser-vm closed this Feb 10, 2025
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