Fix detection of refused streams

This commit is contained in:
Michael Lumish 2022-11-16 14:37:31 -08:00
parent a120aa06b3
commit 95516b66a0
2 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ export class LoadBalancingCall implements Call {
},
onReceiveStatus: status => {
this.trace('Received status');
if (status.code === http2.constants.NGHTTP2_REFUSED_STREAM) {
if (status.rstCode === http2.constants.NGHTTP2_REFUSED_STREAM) {
this.outputStatus(status, 'REFUSED');
} else {
this.outputStatus(status, 'PROCESSED');

View File

@ -385,7 +385,7 @@ export class RetryingCall implements Call {
if (this.underlyingCalls[callIndex].state === 'COMPLETED') {
return;
}
this.trace('state=' + this.state + ' handling status from child [' + this.underlyingCalls[callIndex].call.getCallNumber() + '] in state ' + this.underlyingCalls[callIndex].state);
this.trace('state=' + this.state + ' handling status with progress ' + status.progress + ' from child [' + this.underlyingCalls[callIndex].call.getCallNumber() + '] in state ' + this.underlyingCalls[callIndex].state);
this.underlyingCalls[callIndex].state = 'COMPLETED';
if (status.code === Status.OK) {
this.retryThrottler?.addCallSucceeded();