Skip to content

Commit

Permalink
Merge pull request #2394 from murgatroid99/grpc-js_transport_leak
Browse files Browse the repository at this point in the history
grpc-js: Unregister socket from channelz when closing transport
  • Loading branch information
murgatroid99 committed Mar 23, 2023
2 parents ad719cc + 3fbdf0d commit 114c87c
Show file tree
Hide file tree
Showing 2 changed files with 3 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.8.12",
"version": "1.8.13",
"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
3 changes: 2 additions & 1 deletion packages/grpc-js/src/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { checkServerIdentity, CipherNameAndProtocol, ConnectionOptions, PeerCert
import { StatusObject } from './call-interface';
import { ChannelCredentials } from './channel-credentials';
import { ChannelOptions } from './channel-options';
import { ChannelzCallTracker, registerChannelzSocket, SocketInfo, SocketRef, TlsInfo } from './channelz';
import { ChannelzCallTracker, registerChannelzSocket, SocketInfo, SocketRef, TlsInfo, unregisterChannelzRef } from './channelz';
import { LogVerbosity } from './constants';
import { getProxiedConnection, ProxyConnectionResult } from './http_proxy';
import * as logging from './logging';
Expand Down Expand Up @@ -471,6 +471,7 @@ class Http2Transport implements Transport {

shutdown() {
this.session.close();
unregisterChannelzRef(this.channelzRef);
}
}

Expand Down

0 comments on commit 114c87c

Please sign in to comment.