mirror of https://github.com/grpc/grpc-node.git
Fix stream end handling in xds client
This commit is contained in:
parent
fb98794f7b
commit
61a518c30a
|
@ -401,6 +401,7 @@ class AdsCallState {
|
|||
watcher.onError(streamStatus);
|
||||
}
|
||||
}
|
||||
this.client.handleAdsStreamEnd();
|
||||
}
|
||||
|
||||
hasSubscribedResources(): boolean {
|
||||
|
@ -681,6 +682,7 @@ class LrsCallState {
|
|||
this.client.trace(
|
||||
'ADS stream ended. code=' + status.code + ' details= ' + status.details
|
||||
);
|
||||
this.client.handleLrsStreamEnd();
|
||||
}
|
||||
|
||||
private handleResponseMessage(message: LoadStatsResponse__Output) {
|
||||
|
@ -899,6 +901,7 @@ class XdsSingleServerClient {
|
|||
}
|
||||
|
||||
handleAdsStreamEnd() {
|
||||
this.adsCallState = null;
|
||||
/* The backoff timer would start the stream when it finishes. If it is not
|
||||
* running, restart the stream immediately. */
|
||||
if (!this.adsBackoff.isRunning()) {
|
||||
|
@ -922,6 +925,7 @@ class XdsSingleServerClient {
|
|||
}
|
||||
|
||||
handleLrsStreamEnd() {
|
||||
this.lrsCallState = null;
|
||||
/* The backoff timer would start the stream when it finishes. If it is not
|
||||
* running, restart the stream immediately. */
|
||||
if (!this.lrsBackoff.isRunning()) {
|
||||
|
|
Loading…
Reference in New Issue