Repository navigation
fix: keep api listener alive after transient accept errors - #4659
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe API listener now retries accept errors after a 50 ms backoff while the server is running. It logs the first consecutive error. A successful accept resets the error count, and the accepted stream is handled on a separate thread. The loop checks server state after the backoff and exits when the server stops. Tests cover repeated accept errors and shutdown during continuing errors. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The listener can retry transient accept errors without the identified shutdown-blocking risk. No issue requiring a pre-merge fix was established. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The listener can recover from accept errors without changing who can connect or how requests are handled. No material security regression was established, though shutdown behavior under every runtime condition remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
…4659) * fix: keep api listener alive after transient accept errors refs herdrdev#4601 * fix: drop repeated api accept failure logs refs herdrdev#4601 (cherry picked from commit bde4526) ported from upstream bde4526: the fork has no ssh-agent forwarding in the API server (upstream's multi-machine layer), so the accept loop's connection closure drops the ssh_agents clone and argument; the accept loop and its tests are upstream's, unchanged. refs https://gitea.cat-bluegill.ts.net/AC-forks/herdr/issues/124
…4659) * fix: keep api listener alive after transient accept errors refs herdrdev#4601 * fix: drop repeated api accept failure logs refs herdrdev#4601
refs #4601
A single failed accept on the API socket (ECONNABORTED on macOS, EMFILE, etc.) broke the listener loop for good. The server and panes kept running, but every CLI command, live handoff, and
herdr session stopfailed withserver_not_runninguntil the server was killed.The accept loop now logs the error, backs off 50ms, and keeps accepting. It only exits on error during shutdown. Repeated failures log once at error level and once on recovery, so a sustained failure doesn't flood the log.
Verified:
session stopstill worksjust check