Skip to content

feat: multi purpose websocket client#2160

Open
ifaouibadi wants to merge 2 commits intodevelopfrom
features/websocket
Open

feat: multi purpose websocket client#2160
ifaouibadi wants to merge 2 commits intodevelopfrom
features/websocket

Conversation

@ifaouibadi
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown

@ifaouibadi ifaouibadi force-pushed the features/websocket branch from 32506ee to 1267808 Compare July 13, 2023 09:09
Copy link
Copy Markdown
Collaborator

@subhod-i subhod-i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After from fthe comments the code changes look good to me.

Comment on lines +45 to +53
handleUnknownError(error);
setTimeout(() => {
this.handleWebsocketOpen();
}, WEB_SOCKET_RECONNECT_TIMEOUT);
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe introduce a maximum tries check here to avoid the infinite loop when there is no internet

Copy link
Copy Markdown
Member

@davidyuk davidyuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a code for the same goal in sdk repo https://github.com/aeternity/aepp-sdk-js/blob/develop/src/MiddlewareSubscriber.ts (already released)
Though it has own issues

NETWORK_MAINNET,
} from '../popup/utils';

class WebSocketClient {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add middleware to the name because it is aware of it

@CedrikNikita CedrikNikita force-pushed the features/websocket branch from 1267808 to 5dc7e73 Compare May 2, 2024 13:53
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants