mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
refactor: simplify if statements
This commit is contained in:
parent
20cbfc7e9f
commit
93f8169139
@ -289,9 +289,7 @@ export class ChannelImplementation implements Channel {
|
||||
this.resolvingLoadBalancer.destroy();
|
||||
this.updateState(ConnectivityState.SHUTDOWN);
|
||||
|
||||
if (this.subchannelPool !== undefined) {
|
||||
this.subchannelPool.forceCleanup();
|
||||
}
|
||||
this.subchannelPool.forceCleanup();
|
||||
}
|
||||
|
||||
getTarget() {
|
||||
|
||||
@ -92,7 +92,7 @@ export class SubchannelPool {
|
||||
* Ensure that the cleanup task is spawned.
|
||||
*/
|
||||
ensureCleanupTask(): void {
|
||||
if (this.global === true && this.cleanupTimer === undefined) {
|
||||
if (this.global && this.cleanupTimer === undefined) {
|
||||
this.cleanupTimer = setInterval(() => {
|
||||
this.unrefUnusedSubchannels();
|
||||
}, REF_CHECK_INTERVAL);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user