We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96c8f62 commit 70a5f9bCopy full SHA for 70a5f9b
src/index.ts
@@ -31,7 +31,7 @@ try {
31
32
const transport = createEJsonTransport();
33
34
- process.on("SIGINT", () => {
+ const shutdown = () => {
35
logger.info(LogId.serverCloseRequested, "server", `Server close requested`);
36
37
server
@@ -45,7 +45,11 @@ try {
45
logger.error(LogId.serverCloseFailure, "server", `Error closing server: ${error.message}`);
46
process.exit(1);
47
});
48
- });
+ };
49
+
50
+ process.once("SIGINT", shutdown);
51
+ process.once("SIGTERM", shutdown);
52
+ process.once("SIGQUIT", shutdown);
53
54
await server.connect(transport);
55
} catch (error: unknown) {
0 commit comments