Skip to content

Fix leak in SniHandlerTest (#16367)#16376

Merged
normanmaurer merged 2 commits into
5.0from
sni_fix5
Feb 26, 2026
Merged

Fix leak in SniHandlerTest (#16367)#16376
normanmaurer merged 2 commits into
5.0from
sni_fix5

Conversation

@normanmaurer

Copy link
Copy Markdown
Member

Motivation:
We see this SniHandlerTest often fail with a leak being detected.

Modification:

  • Make sure to wait for the server to shut down, so the leak presence detector isn't racing with the shutdown of the server child channel.
  • Make sure to release any SslContext objects we create, if later ones throw exceptions.
  • Propagate any connect exceptions by awaiting with sync.

Result:
Hopefully more stable SniHandlerTest and no more leaks.

Motivation:
We see this SniHandlerTest often fail with a leak being detected.

Modification:

- Make sure to wait for the server to shut down, so the leak presence
detector isn't racing with the shutdown of the server child channel.
- Make sure to release any `SslContext` objects we create, if later ones
throw exceptions.
- Propagate any connect exceptions by awaiting with `sync`.

Result:
Hopefully more stable `SniHandlerTest` and no more leaks.
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Feb 26, 2026
@normanmaurer normanmaurer merged commit 6b7c924 into 5.0 Feb 26, 2026
11 of 13 checks passed
@normanmaurer normanmaurer deleted the sni_fix5 branch February 26, 2026 15:15
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.

2 participants