fix bug that grpc-status response headers resulted in doubled execution of the callback provided to rpcCall.

This commit is contained in:
Holger Finger 2019-12-19 19:15:53 +01:00 committed by Stanley Cheung
parent 4a5b5b3da6
commit 764d5bcd18
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ const GrpcWebClientReadableStream = function(genericTransportInterface) {
});
errorEmitted = true;
}
if (self.onStatusCallback_) {
if (!errorEmitted && self.onStatusCallback_) {
self.onStatusCallback_(/** @type {!Status} */ ({
code: Number(grpcStatusCode),
details: grpcStatusMessage,