Skip to content

Commit

Permalink
Merge pull request #53 from ainize-team/fix/woojae/handler
Browse files Browse the repository at this point in the history
fix: handler
  • Loading branch information
akastercomcom authored Sep 21, 2023
2 parents 8b31a44 + eadd4bd commit cb56952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handlers/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};

Expand All @@ -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();
}
Expand Down

0 comments on commit cb56952

Please sign in to comment.