fix: increase connection backlog based on max connections#7034
Conversation
WalkthroughThis PR centralizes TCP listener creation across the daemon and offline server by introducing a configurable public ChangesTCP Listener Binding Centralization
🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/rpc/mod.rs`:
- Around line 466-472: The current default_max_connections() accepts 0 which
disables RPC slots; update the parsing pipeline for static VALUE in
default_max_connections to reject zero by filtering parsed u32 values (e.g., add
.filter(|&v| v > 0) after the .and_then(|it| it.parse().ok())) so that if the
env var parses to 0 it falls back to the unwrap_or(1000) default; keep the same
LazyLock VALUE and env var FOREST_RPC_MAX_CONNECTIONS but ensure the parsed
value is >= 1 before returning it.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: bb4fbc2e-4aa8-4079-8f3b-be46199adb57
📒 Files selected for processing (4)
src/daemon/mod.rssrc/rpc/mod.rssrc/tool/offline_server/server.rssrc/utils/net.rs
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Summary of changes
Changes introduced in this pull request:
FOREST_RPC_MAX_CONNECTIONS.Reference issue to close (if applicable)
Closes
Other information and links
Change checklist
Outside contributions
Summary by CodeRabbit