Skip to content

Commit

Permalink
Merge pull request #2861 from murgatroid99/grpc-js_handle_socket_close
Browse files Browse the repository at this point in the history
grpc-js: Restore socket disconnect handling
  • Loading branch information
murgatroid99 authored Dec 2, 2024
2 parents f0c58f7 + 848e00e commit a524d15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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.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",
Expand Down
5 changes: 5 additions & 0 deletions packages/grpc-js/src/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a524d15

Please sign in to comment.