MCPcopy
hub / github.com/Koenkk/zigbee2mqtt / exit

Function exit

index.js:49–57  ·  view source on GitHub ↗

@type {(code: number, restart?: boolean) => Promise }

(code, restart = false)

Source from the content-addressed store, hash-verified

47
48/** @type {(code: number, restart?: boolean) => Promise<void>} */
49async function exit(code, restart = false) {
50 if (!restart) {
51 if (process.env.Z2M_WATCHDOG != null && unsolicitedStop) {
52 await triggerWatchdog(code);
53 } else {
54 process.exit(code);
55 }
56 }
57}
58
59/** @type {() => Promise<string>} */
60async function currentHash() {

Callers 1

startFunction · 0.85

Calls 2

triggerWatchdogFunction · 0.85
exitMethod · 0.80

Tested by

no test coverage detected