mirror of https://github.com/grpc/grpc-node.git
grpc-js: Reference session in transport when there are active calls
This commit is contained in:
parent
3db8acb96f
commit
b342001b38
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@grpc/grpc-js",
|
||||
"version": "1.8.3",
|
||||
"version": "1.8.4",
|
||||
"description": "gRPC Library for Node - pure JS implementation",
|
||||
"homepage": "https://grpc.io/",
|
||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||
|
|
|
@ -354,12 +354,14 @@ class Http2Transport implements Transport {
|
|||
private removeActiveCall(call: Http2SubchannelCall) {
|
||||
this.activeCalls.delete(call);
|
||||
if (this.activeCalls.size === 0 && !this.keepaliveWithoutCalls) {
|
||||
this.session.unref();
|
||||
this.stopKeepalivePings();
|
||||
}
|
||||
}
|
||||
|
||||
private addActiveCall(call: Http2SubchannelCall) {
|
||||
if (this.activeCalls.size === 0 && !this.keepaliveWithoutCalls) {
|
||||
this.session.ref();
|
||||
this.startKeepalivePings();
|
||||
}
|
||||
this.activeCalls.add(call);
|
||||
|
|
Loading…
Reference in New Issue