@grpc/grpc-js
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -196,2 +196,3 @@ "use strict"; | ||
sendPing() { | ||
var _a, _b; | ||
logging.trace(constants_1.LogVerbosity.DEBUG, 'keepalive', 'Sending ping to ' + this.subchannelAddressString); | ||
@@ -201,2 +202,3 @@ this.keepaliveTimeoutId = setTimeout(() => { | ||
}, this.keepaliveTimeoutMs); | ||
(_b = (_a = this.keepaliveTimeoutId).unref) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
this.session.ping((err, duration, payload) => { | ||
@@ -207,5 +209,7 @@ clearTimeout(this.keepaliveTimeoutId); | ||
startKeepalivePings() { | ||
var _a, _b; | ||
this.keepaliveIntervalId = setInterval(() => { | ||
this.sendPing(); | ||
}, this.keepaliveTimeMs); | ||
(_b = (_a = this.keepaliveIntervalId).unref) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
/* Don't send a ping immediately because whatever caused us to start | ||
@@ -212,0 +216,0 @@ * sending pings should also involve some network activity. */ |
{ | ||
"name": "@grpc/grpc-js", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "gRPC Library for Node - pure JS implementation", | ||
@@ -5,0 +5,0 @@ "homepage": "https://grpc.io/", |
@@ -283,2 +283,3 @@ /* | ||
}, this.keepaliveTimeoutMs); | ||
this.keepaliveTimeoutId.unref?.(); | ||
this.session!.ping( | ||
@@ -295,2 +296,3 @@ (err: Error | null, duration: number, payload: Buffer) => { | ||
}, this.keepaliveTimeMs); | ||
this.keepaliveIntervalId.unref?.() | ||
/* Don't send a ping immediately because whatever caused us to start | ||
@@ -297,0 +299,0 @@ * sending pings should also involve some network activity. */ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
978991
188
20254