Skip to content

Commit

Permalink
Merge pull request #1780 from murgatroid99/grpc-js_econnreset_error_p…
Browse files Browse the repository at this point in the history
…arsing

grpc-js: Look for ECONNRESET errors by checking the error code
  • Loading branch information
murgatroid99 committed May 11, 2021
2 parents 21b5ba8 + f009cd7 commit 126961a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 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",
Expand Down
2 changes: 1 addition & 1 deletion packages/grpc-js/src/call-stream.ts
Expand Up @@ -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 {
Expand Down

0 comments on commit 126961a

Please sign in to comment.