Skip to content

Commit 736ebf2

Browse files
committed
Clean up
1 parent 41b297d commit 736ebf2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

global.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.100-rc.1.24452.12"
3+
"version": "9.0.100-rc.2.24474.11",
4+
"rollForward": "latestFeature"
45
}
56
}

src/Grpc.Net.Client/Balancer/SubchannelsLoadBalancer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public override void UpdateChannelState(ChannelState state)
122122

123123
var allUpdatedSubchannels = new List<AddressSubchannel>();
124124
var newSubchannels = new List<Subchannel>();
125-
var modifiedSubchannelsCount = 0;
125+
var hasModifiedSubchannels = false;
126126
var currentSubchannels = _addressSubchannels.ToList();
127127

128128
// The state's addresses is the new authoritative list of addresses.
@@ -152,7 +152,7 @@ public override void UpdateChannelState(ChannelState state)
152152
newOrCurrentSubchannel.LastKnownState);
153153
newOrCurrentSubchannel.Subchannel.UpdateAddresses(new[] { address });
154154

155-
modifiedSubchannelsCount++;
155+
hasModifiedSubchannels = true;
156156
}
157157

158158
SubchannelLog.SubchannelPreserved(_logger, newOrCurrentSubchannel.Subchannel.Id, address);
@@ -174,7 +174,7 @@ public override void UpdateChannelState(ChannelState state)
174174
// This can all be removed.
175175
var removedSubConnections = currentSubchannels;
176176

177-
if (removedSubConnections.Count == 0 && newSubchannels.Count == 0 && modifiedSubchannelsCount == 0)
177+
if (removedSubConnections.Count == 0 && newSubchannels.Count == 0 && !hasModifiedSubchannels)
178178
{
179179
SubchannelsLoadBalancerLog.ConnectionsUnchanged(_logger);
180180
return;

0 commit comments

Comments
 (0)