Skip to content

fix: implement Tuic.Close to release PoolClient resources#2713

Open
beck-8 wants to merge 1 commit into
MetaCubeX:Alphafrom
beck-8:fix/tuic-close
Open

fix: implement Tuic.Close to release PoolClient resources#2713
beck-8 wants to merge 1 commit into
MetaCubeX:Alphafrom
beck-8:fix/tuic-close

Conversation

@beck-8

@beck-8 beck-8 commented Apr 15, 2026

Copy link
Copy Markdown
Tuic outbound inherited the no-op Base.Close, so autoCloseProxyAdapter
could not cascade cleanup into the PoolClient. Every clientImpl (and its
SingleUse quic.Transport) then had to wait for its own closeClient
finalizer to run, a multi-cycle GC chain that delays release of the
listen/runSendQueue goroutines under rapid create/destroy workloads.

Add a public PoolClient.Close that closes every cached clientImpl, and
wire it up from Tuic.Close so the Close path is synchronous and does not
depend on GC.

@beck-8
beck-8 marked this pull request as draft April 15, 2026 11:00
Tuic outbound inherited the no-op Base.Close, so autoCloseProxyAdapter
could not cascade cleanup into the PoolClient. Every clientImpl (and its
SingleUse quic.Transport) then had to wait for its own closeClient
finalizer to run, a multi-cycle GC chain that delays release of the
listen/runSendQueue goroutines under rapid create/destroy workloads.

Add a public PoolClient.Close that closes every cached clientImpl, and
wire it up from Tuic.Close so the Close path is synchronous and does not
depend on GC.
@beck-8
beck-8 marked this pull request as ready for review April 15, 2026 12:48
@wwqgtxx
wwqgtxx force-pushed the Alpha branch 2 times, most recently from 5a5e312 to 8d53952 Compare April 22, 2026 10:55
@wwqgtxx
wwqgtxx force-pushed the Alpha branch 5 times, most recently from 61b8d7f to 17bed79 Compare May 15, 2026 10:13
@wwqgtxx
wwqgtxx force-pushed the Alpha branch 3 times, most recently from f513c49 to d67572b Compare June 12, 2026 02:06
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