Skip to content

fix: prevent proxy accept tight loop and connection leaks - #72

Merged
zx06 merged 2 commits into
mainfrom
fix/proxy-high-cpu-leak
Aug 21, 2026
Merged

fix: prevent proxy accept tight loop and connection leaks#72
zx06 merged 2 commits into
mainfrom
fix/proxy-high-cpu-leak

Conversation

@zx06

@zx06 zx06 commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix accept tight loop in proxy by adding exponential backoff on listener errors.
  • Fix connection and goroutine leaks by properly closing counterpart connection upon EOF or error in bidirectional copy.
  • Add unit tests verifying immediate connection cleanup on remote/local disconnect.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.93939% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.21%. Comparing base (ed3f8a8) to head (93bcfc0).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/proxy/proxy.go 93.93% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   82.16%   82.21%   +0.04%     
==========================================
  Files          62       62              
  Lines        5972     5983      +11     
==========================================
+ Hits         4907     4919      +12     
+ Misses        801      798       -3     
- Partials      264      266       +2     
Flag Coverage Δ
e2e 28.65% <ø> (ø)
integration 28.65% <ø> (ø)
unittests 74.72% <93.93%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
17.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@zx06
zx06 merged commit 22fa6f7 into main Aug 21, 2026
13 of 14 checks passed
@zx06
zx06 deleted the fix/proxy-high-cpu-leak branch August 21, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant