Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async stop() {
if (this.mode !== MODES.STOPPED) {
this.disconnect();
this.logger.disconnect();
await (this.persister && this.persister.persist());
this.mode = MODES.STOPPED;
await EVENT_EMITTER.emit('stop', this);
}
}
async stop() {
if (this.mode !== MODES.STOPPED) {
this.disconnect();
this.logger.disconnect();
await (this.persister && this.persister.persist());
this.mode = MODES.STOPPED;
await EVENT_EMITTER.emit('stop', this);
}
}