()
| 1406 | }); |
| 1407 | |
| 1408 | const finish = () => { |
| 1409 | if (finished) return; |
| 1410 | finished = true; |
| 1411 | process.off("SIGINT", shutdown); |
| 1412 | process.off("SIGTERM", shutdown); |
| 1413 | process.stdin.off("end", shutdown); |
| 1414 | process.stdin.off("close", shutdown); |
| 1415 | resolveExit(); |
| 1416 | }; |
| 1417 | |
| 1418 | const closeBoth = (): Promise<void> => { |
| 1419 | if (!closePromise) { |
no test coverage detected