Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interrupt existing subchannel connect attempt when reconnect is requested #2410

Merged
merged 3 commits into from
Apr 13, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Only log if addresses change
  • Loading branch information
JamesNK committed Apr 13, 2024
commit 8486c6248bba26117f536a269cdc49d7c216ec91
4 changes: 2 additions & 2 deletions src/Grpc.Net.Client/Balancer/Subchannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ public void Dispose()
/// <param name="addresses"></param>
public void UpdateAddresses(IReadOnlyList<BalancerAddress> addresses)
{
SubchannelLog.AddressesUpdated(_logger, Id, addresses);

var requireReconnect = false;
lock (Lock)
{
Expand All @@ -176,6 +174,8 @@ public void UpdateAddresses(IReadOnlyList<BalancerAddress> addresses)
return;
}

SubchannelLog.AddressesUpdated(_logger, Id, addresses);

// Get a copy of the current address before updating addresses.
// Updating addresses to not contain this value changes the property to return null.
var currentAddress = CurrentAddress;
Expand Down
Loading