From f009cd7b9fdbca41106078e2559669a24794390f Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Thu, 6 May 2021 10:58:32 -0700 Subject: [PATCH] grpc-js: Look for ECONNRESET errors by code instead of errno --- packages/grpc-js/package.json | 2 +- packages/grpc-js/src/call-stream.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-js/package.json b/packages/grpc-js/package.json index 04fa4585a..f0e879203 100644 --- a/packages/grpc-js/package.json +++ b/packages/grpc-js/package.json @@ -1,6 +1,6 @@ { "name": "@grpc/grpc-js", - "version": "1.3.0", + "version": "1.3.1", "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/call-stream.ts b/packages/grpc-js/src/call-stream.ts index 8fcc7065e..57693343f 100644 --- a/packages/grpc-js/src/call-stream.ts +++ b/packages/grpc-js/src/call-stream.ts @@ -589,7 +589,7 @@ export class Http2CallStream implements Call { * "Internal server error" message. */ details = `Received RST_STREAM with code ${stream.rstCode} (Internal server error)`; } else { - if (this.internalError.errno === os.constants.errno.ECONNRESET) { + if (this.internalError.code === 'ECONNRESET') { code = Status.UNAVAILABLE; details = this.internalError.message; } else {