Skip to content

Commit

Permalink
grpc-js: Unregister socket from channelz when closing transport
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed Mar 10, 2023
1 parent 9264d58 commit 056dc8e
Showing 1 changed file with 2 additions and 1 deletion.
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 056dc8e

Please sign in to comment.