Skip to content

Commit

Permalink
grpc-js: Look for ECONNRESET errors by code instead of errno
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed May 10, 2021
1 parent d82b1a3 commit f009cd7
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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 f009cd7

Please sign in to comment.