@grpc/grpc-js
Advanced tools
Comparing version 1.2.10 to 1.2.11
@@ -63,2 +63,3 @@ "use strict"; | ||
runOnce() { | ||
var _a, _b; | ||
this.running = true; | ||
@@ -70,3 +71,3 @@ this.timerId = setTimeout(() => { | ||
if (!this.hasRef) { | ||
this.timerId.unref(); | ||
(_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
} | ||
@@ -96,8 +97,10 @@ const nextBackoff = Math.min(this.nextDelay * this.multiplier, this.maxDelay); | ||
ref() { | ||
var _a, _b; | ||
this.hasRef = true; | ||
this.timerId.ref(); | ||
(_b = (_a = this.timerId).ref) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
} | ||
unref() { | ||
var _a, _b; | ||
this.hasRef = false; | ||
this.timerId.unref(); | ||
(_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
} | ||
@@ -104,0 +107,0 @@ } |
@@ -296,2 +296,5 @@ "use strict"; | ||
watchConnectivityState(currentState, deadline, callback) { | ||
if (this.connectivityState === ConnectivityState.SHUTDOWN) { | ||
throw new Error('Channel has been shut down'); | ||
} | ||
let timer = null; | ||
@@ -298,0 +301,0 @@ if (deadline !== Infinity) { |
{ | ||
"name": "@grpc/grpc-js", | ||
"version": "1.2.10", | ||
"version": "1.2.11", | ||
"description": "gRPC Library for Node - pure JS implementation", | ||
@@ -5,0 +5,0 @@ "homepage": "https://grpc.io/", |
@@ -79,3 +79,3 @@ /* | ||
if (!this.hasRef) { | ||
this.timerId.unref(); | ||
this.timerId.unref?.(); | ||
} | ||
@@ -113,3 +113,3 @@ const nextBackoff = Math.min( | ||
this.hasRef = true; | ||
this.timerId.ref(); | ||
this.timerId.ref?.(); | ||
} | ||
@@ -119,4 +119,4 @@ | ||
this.hasRef = false; | ||
this.timerId.unref(); | ||
this.timerId.unref?.(); | ||
} | ||
} |
@@ -483,2 +483,5 @@ /* | ||
): void { | ||
if (this.connectivityState === ConnectivityState.SHUTDOWN) { | ||
throw new Error('Channel has been shut down'); | ||
} | ||
let timer = null; | ||
@@ -485,0 +488,0 @@ if(deadline !== Infinity) { |
Sorry, the diff of this file is not supported yet
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
1124105
22508