()
| 87 | let timer: NodeJS.Timeout | null = null; |
| 88 | |
| 89 | const schedule = (): void => { |
| 90 | if (timer) clearTimeout(timer); |
| 91 | timer = setTimeout(() => { |
| 92 | timer = null; |
| 93 | if (options.isTransportAlive && options.isTransportAlive()) { |
| 94 | schedule(); |
| 95 | return; |
| 96 | } |
| 97 | options.onIdle(); |
| 98 | }, options.timeoutMs); |
| 99 | unrefHandle(timer); |
| 100 | }; |
| 101 | |
| 102 | schedule(); |
| 103 |
no test coverage detected