(filePath: string, key: string)
| 434 | // those meant refusing to relaunch an already-idle pane for 60s. |
| 435 | if (paneHasRunningService(sessionName, currentPane)) { |
| 436 | idlePolls = 0; |
| 437 | if (elapsed >= GIVE_UP_AT_MS) { |
| 438 | // Refuses to die — typing into it would only feed its stdin. |
| 439 | settle('gave-up'); |
| 440 | } else if (!escalated && elapsed >= ESCALATE_AT_MS) { |
| 441 | // Mirror a human's second ctrl-c: wrangler and friends force-quit |
| 442 | // on a repeated interrupt when a graceful shutdown hangs. |
| 443 | escalated = true; |
| 444 | try { |
| 445 | sendInterrupt(sessionName, currentPane.windowIndex, currentPane.paneIndex); |
| 446 | } catch { |
| 447 | // Pane may vanish between the check and the signal; next tick |
| 448 | // handles it via the recreate branch. |
| 449 | } |
| 450 | } |
| 451 | return; |
| 452 | } |
| 453 | if (++idlePolls < IDLE_POLLS_BEFORE_RELAUNCH) return; |
| 454 | try { |
no test coverage detected