mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-05 12:42:30 +00:00
* fix(dashboard): close PTY WebSocket on child EOF to stop FD leak The /api/pty handler's reader task returns on child EOF, but the writer loop stayed blocked on ws.receive() until the browser sent a disconnect. When the browser socket is half-open (no FIN delivered — common on macOS/launchd), that disconnect never arrives, so the handler never reaches its finally and the PTY master fd + child process leak. With dashboard auto-reconnect (#52962), every dropped socket then spawns a fresh PTY on top of the orphaned one, exhausting file descriptors within hours (EMFILE / Errno 24). Fix: the reader task now closes the WebSocket in a finally when the child EOFs or the send side breaks, which unblocks ws.receive() so the existing finally runs bridge.close(). The writer loop also guards ws.receive() against the RuntimeError Starlette raises once the socket is closed. Reported by @fifteenzhang. Fixes #54028 * docs: add infographic for #54028 PTY FD leak fix |
||
|---|---|---|
| .. | ||
| 53175-gateway-cleanup-off-loop | ||
| atomic-env-snapshot-38249 | ||
| auth-login-hint-fix | ||
| ci-file-timeout-300 | ||
| clarify-expiry-32762 | ||
| content-filter-fallback | ||
| discord-no-bot2bot | ||
| eager-fallback-transport | ||
| empty-400-unmasked | ||
| gateway-force-exit-53107 | ||
| intent-ack-continuation | ||
| model-name-canon | ||
| model-picker-fixes | ||
| partial-stream-recovery | ||
| pr-27539 | ||
| pr-29285-provider-precedence | ||
| pr-54028-pty-fd-leak | ||
| skills-sync-external-dirs | ||
| standalone-plugin-policy | ||
| state-db-fullfsync | ||
| telegram-send-path-35205 | ||
| vision-any-provider | ||
| whatsapp-lid-session-fix | ||
| whatsapp-send-queue | ||
| windows-update-loop-52378 | ||