Only start the timer if the ADS stream is running

This commit is contained in:
Michael Lumish 2022-05-12 17:34:25 -07:00
parent a041056e71
commit 65075e50a7
1 changed files with 3 additions and 1 deletions

View File

@ -113,7 +113,9 @@ export abstract class BaseXdsStreamState<ResponseType> implements XdsStreamState
cachedResponse: null,
resourceTimer: setTimeout(() => {}, 0)
};
this.startResourceTimer(subscriptionEntry);
if (this.isAdsStreamRunning) {
this.startResourceTimer(subscriptionEntry);
}
this.subscriptions.set(name, subscriptionEntry);
}
subscriptionEntry.watchers.push(watcher);