()
| 1416 | }); |
| 1417 | |
| 1418 | const finish = () => { |
| 1419 | if (finished) return; |
| 1420 | finished = true; |
| 1421 | process.off("SIGINT", shutdown); |
| 1422 | process.off("SIGTERM", shutdown); |
| 1423 | process.stdin.off("end", shutdown); |
| 1424 | process.stdin.off("close", shutdown); |
| 1425 | resolveExit(); |
| 1426 | }; |
| 1427 | |
| 1428 | const closeBoth = (): Promise<void> => { |
| 1429 | if (!closePromise) { |
no test coverage detected