fix: only unref timers in supported environments

fix #1077
This commit is contained in:
Tom Kirkpatrick 2019-10-18 22:01:37 +02:00
parent 1d157dfd10
commit c0f53f2238
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ export class SubchannelPool {
}, REF_CHECK_INTERVAL);
// Unref because this timer should not keep the event loop running.
this.cleanupTimer.unref();
this.cleanupTimer.unref && this.cleanupTimer.unref();
}
}