()
| 1387 | }); |
| 1388 | |
| 1389 | const finish = () => { |
| 1390 | if (finished) return; |
| 1391 | finished = true; |
| 1392 | process.off("SIGINT", shutdown); |
| 1393 | process.off("SIGTERM", shutdown); |
| 1394 | process.stdin.off("end", shutdown); |
| 1395 | process.stdin.off("close", shutdown); |
| 1396 | resolveExit(); |
| 1397 | }; |
| 1398 | |
| 1399 | const closeBoth = (): Promise<void> => { |
| 1400 | if (!closePromise) { |
no test coverage detected