Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ try {

const transport = createEJsonTransport();

process.on("SIGINT", () => {
const shutdown = () => {
logger.info(LogId.serverCloseRequested, "server", `Server close requested`);

server
Expand All @@ -45,7 +45,11 @@ try {
logger.error(LogId.serverCloseFailure, "server", `Error closing server: ${error.message}`);
process.exit(1);
});
});
};

process.on("SIGINT", shutdown);
process.on("SIGTERM", shutdown);
process.on("SIGQUIT", shutdown);

await server.connect(transport);
} catch (error: unknown) {
Expand Down
Loading