From eadd4bdd90c32fbfb16cc8dc3cd51e8843df1719 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Thu, 21 Sep 2023 09:36:26 +0900 Subject: [PATCH] fix: handler --- src/handlers/handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/handler.ts b/src/handlers/handler.ts index e98a366..67bce12 100644 --- a/src/handlers/handler.ts +++ b/src/handlers/handler.ts @@ -24,7 +24,7 @@ export default class Handler { async connect() { this.checkEventManager(); - await this.ain.getEventManager().connect({},this.disconnectedCb); + await this.ain.getEventManager().connect({},this.disconnectedCb.bind(this)); console.log('connected'); }; @@ -35,7 +35,7 @@ export default class Handler { } private async disconnectedCb() { - if(!AinModule.getInstance().isDefaultAccountExist()) { + if(AinModule.getInstance().isDefaultAccountExist()) { console.log('disconnected. reconnecting...'); await this.connect(); }