Skip to content

fix(socks5): evict unused origin pools#5595

Open
Kkartik14 wants to merge 1 commit into
nodejs:mainfrom
Kkartik14:fix/socks5-evict-unused-pools
Open

fix(socks5): evict unused origin pools#5595
Kkartik14 wants to merge 1 commit into
nodejs:mainfrom
Kkartik14:fix/socks5-evict-unused-pools

Conversation

@Kkartik14

Copy link
Copy Markdown

Fixes #5594

Rationale

Socks5ProxyAgent kept an empty per-origin pool in its internal cache after a SOCKS connection error or a normal target disconnect. A long-lived agent handling many destinations could therefore retain pools indefinitely.

Changes

  • remove an idle, non-busy origin pool on connectionError and disconnect
  • cover both lifecycle paths with SOCKS5 integration tests

Features

N/A

Bug Fixes

  • release unused SOCKS5 origin pools

Breaking Changes and Deprecations

N/A

Status

  • I have read and agreed to the Developer's Certificate of Origin
  • Tested (test/socks5-proxy-agent.js)
  • Benchmarked (optional)
  • Documented (not applicable)
  • Review ready
  • In review
  • Merge ready

Signed-off-by: Kartik Gupta <kartikgupta1474@gmail.com>

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

fix(socks5): evict unused origin pools

2 participants