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 c884f48 commit 897e0ceCopy full SHA for 897e0ce
src/node/heart.ts
@@ -1,5 +1,6 @@
1
import { logger } from "@coder/logger"
2
import { promises as fs } from "fs"
3
+import { wrapper } from "./wrapper"
4
5
/**
6
* Provides a heartbeat using a local file to indicate activity.
@@ -56,7 +57,7 @@ export class Heart {
56
57
const timeSinceLastBeat = Date.now() - this.lastHeartbeat
58
if (timeSinceLastBeat > this.idleTimeout! * 60 * 1000) {
59
logger.warn(`Idle timeout of ${this.idleTimeout} minutes exceeded`)
- process.kill(process.pid, "SIGTERM")
60
+ wrapper.exit(5)
61
}
62
}, 60000)
63
0 commit comments