Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3662,7 +3662,15 @@ private void LoginWithFailover(
continue;
}

if (IsDoNotRetryConnectError(sqlex) || timeout.IsExpired)
// If state != closed, indicates that the parser encountered an error while
// processing the login response (e.g. an explicit error token). Transient
// network errors that impact connectivity will result in parser state being
// closed. Only network-level errors should trigger failover alternation;
// login-phase errors (like transient errors) should be thrown so they can
Comment on lines +3665 to +3669
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

Minor grammar/clarity: the new comment reads "If state != closed, indicates...". Consider rephrasing to "If state != Closed, it indicates..." (and optionally reference TdsParserState.Closed explicitly) to match the code and improve readability.

Copilot uses AI. Check for mistakes.
// be handled by the outer ConnectRetryCount loop.
if (_parser?.State is not TdsParserState.Closed ||
IsDoNotRetryConnectError(sqlex) ||
timeout.IsExpired)
{
// No more time to try again.
// Caller will call LoginFailure()
Expand Down
Loading