diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index 20ddd28..1b068a9 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -16,15 +16,13 @@ export default class Handler { * @returns Nothing. */ async connect() { - await this.ain.em.connect({ - heartbeatIntervalMs: HANDLER_HEARBEAT_INTERVAL, - }, this.disconnectedCallback.bind(this)); + await this.ain.em.connect({}, this.disconnectedCallback.bind(this)); this.isConnected = true; }; - private disconnectedCallback() { + private async disconnectedCallback() { this.isConnected = false; - this.connect(); + await this.connect(); } /**