From 0d9a8c1dcf0f46eda09540518c50d28519201d58 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Wed, 3 Apr 2024 09:40:22 -0700 Subject: [PATCH] grpc-js: Fix check for whether to send a trailers-only response --- packages/grpc-js/package.json | 2 +- packages/grpc-js/src/server-interceptors.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-js/package.json b/packages/grpc-js/package.json index 09ae217d..3b8ccf2c 100644 --- a/packages/grpc-js/package.json +++ b/packages/grpc-js/package.json @@ -1,6 +1,6 @@ { "name": "@grpc/grpc-js", - "version": "1.10.5", + "version": "1.10.6", "description": "gRPC Library for Node - pure JS implementation", "homepage": "https://grpc.io/", "repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js", diff --git a/packages/grpc-js/src/server-interceptors.ts b/packages/grpc-js/src/server-interceptors.ts index c9cfe416..b62d5510 100644 --- a/packages/grpc-js/src/server-interceptors.ts +++ b/packages/grpc-js/src/server-interceptors.ts @@ -866,7 +866,7 @@ export class BaseServerInterceptingCall status.details ); - if (this.stream.headersSent) { + if (this.metadataSent) { if (!this.wantTrailers) { this.wantTrailers = true; this.stream.once('wantTrailers', () => {