()
| 1376 | }); |
| 1377 | |
| 1378 | const finish = () => { |
| 1379 | if (finished) return; |
| 1380 | finished = true; |
| 1381 | process.off("SIGINT", shutdown); |
| 1382 | process.off("SIGTERM", shutdown); |
| 1383 | process.stdin.off("end", shutdown); |
| 1384 | process.stdin.off("close", shutdown); |
| 1385 | resolveExit(); |
| 1386 | }; |
| 1387 | |
| 1388 | const closeBoth = (): Promise<void> => { |
| 1389 | if (!closePromise) { |
no test coverage detected