Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc-js: Look for ECONNRESET errors by checking the error code #1780

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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