(entry: PoolEntry)
| 161 | } |
| 162 | |
| 163 | function recordStreamFailure(entry: PoolEntry) { |
| 164 | entry.streamFailures++ |
| 165 | // Codex counts retries after the initial failed WebSocket attempt. |
| 166 | if (entry.streamFailures > streamRetries) entry.fallback = true |
| 167 | } |
| 168 | |
| 169 | function prune() { |
| 170 | const now = Date.now() |