grpc-js-xds: Reset LRS backoff on data, not metadata

This commit is contained in:
Michael Lumish 2020-11-13 14:54:38 -08:00
parent b78e5a0762
commit 8bacb12d23
1 changed files with 1 additions and 3 deletions

View File

@ -1018,13 +1018,11 @@ export class XdsClient {
this.lrsBackoff.runOnce();
this.lrsCall = this.lrsClient.streamLoadStats();
this.lrsCall.on('metadata', () => {
this.lrsCall.on('data', (message: LoadStatsResponse__Output) => {
/* Once we get any response from the server, we assume that the stream is
* in a good state, so we can reset the backoff timer. */
this.lrsBackoff.stop();
this.lrsBackoff.reset();
});
this.lrsCall.on('data', (message: LoadStatsResponse__Output) => {
if (
message.load_reporting_interval?.seconds !==
this.latestLrsSettings?.load_reporting_interval?.seconds ||