diff --git a/packages/grpc-js/src/channel.ts b/packages/grpc-js/src/channel.ts index 88b1d499..8b2658f3 100644 --- a/packages/grpc-js/src/channel.ts +++ b/packages/grpc-js/src/channel.ts @@ -509,6 +509,11 @@ export class ChannelImplementation implements Channel { } private tryGetConfig(stream: Http2CallStream, metadata: Metadata) { + if (stream.getStatus() !== null) { + /* If the stream has a status, it has already finished and we don't need + * to take any more actions on it. */ + return; + } if (this.configSelector === null) { /* This branch will only be taken at the beginning of the channel's life, * before the resolver ever returns a result. So, the