Only reconnect to same address list if idle

This commit is contained in:
murgatroid99 2019-10-10 10:48:11 -07:00
parent 4250ac6685
commit 2c4798e3d6
1 changed files with 4 additions and 2 deletions

View File

@ -356,12 +356,14 @@ export class PickFirstLoadBalancer implements LoadBalancer {
for (const subchannel of this.subchannels) {
subchannel.startConnecting();
}
if (this.currentState === ConnectivityState.IDLE || this.triedAllSubchannels) {
this.channelControlHelper.requestReresolution();
if (this.currentState === ConnectivityState.IDLE) {
if (this.latestAddressList.length > 0) {
this.connectToAddressList();
}
}
if (this.currentState === ConnectivityState.IDLE || this.triedAllSubchannels) {
this.channelControlHelper.requestReresolution();
}
}
resetBackoff() {