Skip to content

Fix leak in SniHandlerTest (#16367)#16377

Merged
normanmaurer merged 1 commit into
4.1from
sni_fix41
Feb 26, 2026
Merged

Fix leak in SniHandlerTest (#16367)#16377
normanmaurer merged 1 commit into
4.1from
sni_fix41

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 merged commit 5c45828 into 4.1 Feb 26, 2026
19 checks passed
@normanmaurer normanmaurer deleted the sni_fix41 branch February 26, 2026 15:13
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