We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 99ae020 + 01749a8 commit 9ef4655Copy full SHA for 9ef4655
packages/grpc-js/src/load-balancing-call.ts
@@ -140,6 +140,13 @@ export class LoadBalancingCall implements Call {
140
.generateMetadata({ service_url: this.serviceUrl })
141
.then(
142
credsMetadata => {
143
+ /* If this call was cancelled (e.g. by the deadline) before
144
+ * metadata generation finished, we shouldn't do anything with
145
+ * it. */
146
+ if (this.ended) {
147
+ this.trace('Credentials metadata generation finished after call ended');
148
+ return;
149
+ }
150
const finalMetadata = this.metadata!.clone();
151
finalMetadata.merge(credsMetadata);
152
if (finalMetadata.get('authorization').length > 1) {
0 commit comments