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