diff --git a/packages/grpc-js/package.json b/packages/grpc-js/package.json index 46dc7efd7..fd8dd7abf 100644 --- a/packages/grpc-js/package.json +++ b/packages/grpc-js/package.json @@ -1,6 +1,6 @@ { "name": "@grpc/grpc-js", - "version": "1.12.2", + "version": "1.12.3", "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/transport.ts b/packages/grpc-js/src/transport.ts index 063fc86d9..7a82fd3cc 100644 --- a/packages/grpc-js/src/transport.ts +++ b/packages/grpc-js/src/transport.ts @@ -227,6 +227,11 @@ class Http2Transport implements Transport { this.handleDisconnect(); }); + session.socket.once('close', () => { + this.trace('connection closed'); + this.handleDisconnect(); + }); + if (logging.isTracerEnabled(TRACER_NAME)) { session.on('remoteSettings', (settings: http2.Settings) => { this.trace(