Skip to content

[DEV] Block on TLS auth in NetworkHandler#1750

Merged
kevin-montrose merged 2 commits into
devfrom
users/kmontrose/networkHandlerStartBlocking-dev
Apr 29, 2026
Merged

[DEV] Block on TLS auth in NetworkHandler#1750
kevin-montrose merged 2 commits into
devfrom
users/kmontrose/networkHandlerStartBlocking-dev

Conversation

@kevin-montrose
Copy link
Copy Markdown
Contributor

dev version of #1748

Copilot AI review requested due to automatic review settings April 29, 2026 18:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR changes TLS authentication startup to be blocking in the synchronous Start(...) APIs, removing the prior “spin until authenticated” polling pattern from client call sites.

Changes:

  • Make NetworkHandler.Start(...) block until TLS authentication finishes (server/client).
  • Remove IsAuthenticated(out Exception fault) and delete downstream spin-wait authentication loops.
  • Update XML docs/comments to reflect the new blocking behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
libs/common/Networking/NetworkHandler.cs Makes sync Start block on async TLS auth and removes IsAuthenticated API.
libs/common/LightClient.cs Removes post-Start spin-wait loop for authentication completion.
libs/client/GarnetClient.cs Removes post-Start spin-wait loop for authentication completion/cancellation.
libs/client/ClientSession/GarnetClientSession.cs Removes post-Start spin-wait loop for authentication completion/cancellation.
benchmark/BDN.benchmark/Embedded/GarnetServerEmbedded.cs Removes post-Start spin-wait loop for authentication completion.
Comments suppressed due to low confidence (1)

libs/common/Networking/NetworkHandler.cs:1

  • This PR removes a public API (IsAuthenticated(out Exception fault)), which is a breaking change for any external consumers that may be using it (even though in-repo call sites were updated). If compatibility matters, consider keeping it as an [Obsolete] shim (potentially without exposing internal exception state), or replacing it with a non-breaking alternative (e.g., a property/event) and deprecating the old method over a release cycle.
// Copyright (c) Microsoft Corporation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libs/common/Networking/NetworkHandler.cs
Comment thread libs/common/Networking/NetworkHandler.cs
Comment thread libs/common/Networking/NetworkHandler.cs
@kevin-montrose kevin-montrose merged commit f174025 into dev Apr 29, 2026
27 checks passed
@kevin-montrose kevin-montrose deleted the users/kmontrose/networkHandlerStartBlocking-dev branch April 29, 2026 19:42
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.

3 participants