Skip to content

Commit 114c87c

Browse files
authored
Merge pull request #2394 from murgatroid99/grpc-js_transport_leak
grpc-js: Unregister socket from channelz when closing transport
2 parents ad719cc + 3fbdf0d commit 114c87c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/grpc-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js",
3-
"version": "1.8.12",
3+
"version": "1.8.13",
44
"description": "gRPC Library for Node - pure JS implementation",
55
"homepage": "https://grpc.io/",
66
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

packages/grpc-js/src/transport.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { checkServerIdentity, CipherNameAndProtocol, ConnectionOptions, PeerCert
2020
import { StatusObject } from './call-interface';
2121
import { ChannelCredentials } from './channel-credentials';
2222
import { ChannelOptions } from './channel-options';
23-
import { ChannelzCallTracker, registerChannelzSocket, SocketInfo, SocketRef, TlsInfo } from './channelz';
23+
import { ChannelzCallTracker, registerChannelzSocket, SocketInfo, SocketRef, TlsInfo, unregisterChannelzRef } from './channelz';
2424
import { LogVerbosity } from './constants';
2525
import { getProxiedConnection, ProxyConnectionResult } from './http_proxy';
2626
import * as logging from './logging';
@@ -471,6 +471,7 @@ class Http2Transport implements Transport {
471471

472472
shutdown() {
473473
this.session.close();
474+
unregisterChannelzRef(this.channelzRef);
474475
}
475476
}
476477

0 commit comments

Comments
 (0)