Skip to content

Commit

Permalink
Merge pull request #55 from singlesly/feat-client-id
Browse files Browse the repository at this point in the history
feat: fix unhandled
  • Loading branch information
singlesly authored Oct 23, 2023
2 parents a73da24 + 40d6b0c commit 6db3256
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/bingx-socket/bingx-account-socket-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ export class BingxAccountSocketStream {
new URL('/swap-market', 'wss://open-api-swap.bingx.com'),
};

this.connect(this.account, this.configuration.requestExecutor).catch(() => {
console.error('Cannot connect to account', this.account);
});
try {
this.connect(this.account, this.configuration.requestExecutor).catch(
() => {
console.error('Cannot connect to account', this.account);
},
);
} catch (e) {
console.error('Cannot connect to account error', this.account);
}
}

private async connect(
Expand Down

0 comments on commit 6db3256

Please sign in to comment.