Skip to content

Commit 95516b6

Browse files
committed
Fix detection of refused streams
1 parent a120aa0 commit 95516b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/grpc-js/src/load-balancing-call.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class LoadBalancingCall implements Call {
159159
},
160160
onReceiveStatus: status => {
161161
this.trace('Received status');
162-
if (status.code === http2.constants.NGHTTP2_REFUSED_STREAM) {
162+
if (status.rstCode === http2.constants.NGHTTP2_REFUSED_STREAM) {
163163
this.outputStatus(status, 'REFUSED');
164164
} else {
165165
this.outputStatus(status, 'PROCESSED');

packages/grpc-js/src/retrying-call.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ export class RetryingCall implements Call {
385385
if (this.underlyingCalls[callIndex].state === 'COMPLETED') {
386386
return;
387387
}
388-
this.trace('state=' + this.state + ' handling status from child [' + this.underlyingCalls[callIndex].call.getCallNumber() + '] in state ' + this.underlyingCalls[callIndex].state);
388+
this.trace('state=' + this.state + ' handling status with progress ' + status.progress + ' from child [' + this.underlyingCalls[callIndex].call.getCallNumber() + '] in state ' + this.underlyingCalls[callIndex].state);
389389
this.underlyingCalls[callIndex].state = 'COMPLETED';
390390
if (status.code === Status.OK) {
391391
this.retryThrottler?.addCallSucceeded();

0 commit comments

Comments
 (0)