Skip to content

Commit

Permalink
Merge pull request #101 from ainize-team/release/1.1.1
Browse files Browse the repository at this point in the history
Upgrade version to 1.1.1
  • Loading branch information
yoojinko authored Feb 14, 2024
2 parents 3889c22 + cb79227 commit 89cde13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ainize-team/ainize-js",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/ainize.js",
"types": "dist/ainize.d.ts",
"scripts": {
Expand Down
13 changes: 9 additions & 4 deletions src/handlers/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,18 @@ export default class Handler {
async disconnect() {
this.checkEventManager();
await this.ain.getEventManager().disconnect();
console.log('disconnected');
console.log('Disconnected');
}

private async disconnectedCb() {
if(await AinModule.getInstance().getAddress()) {
console.log('disconnected. reconnecting...');
await this.connect();
try {
const address = await AinModule.getInstance().getAddress();
if (address) {
console.log('Disconnected. Reconnecting...');
await this.connect();
}
} catch (_) {
return;
}
}

Expand Down

0 comments on commit 89cde13

Please sign in to comment.