Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this._checkTimer = setInterval(() => {
const state = this._client.getState();
switch (state) {
case State.EXPIRED:
case State.DISCONNECTED:
log(`checker is error, state is ${state}, need reconnect`);
this._reconnect();
break;
default:
log(`checker is ok, state is ${state}`);
}
}, CHECK_TIME);
}