Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multi purpose websocket client #2160

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

ifaouibadi
Copy link
Member

No description provided.

@github-actions
Copy link

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

@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.

src/lib/WebSocketClient.ts Outdated Show resolved Hide resolved
src/lib/WebSocketClient.ts Outdated Show resolved Hide resolved
src/lib/WebSocketClient.ts Outdated Show resolved Hide resolved
Comment on lines +45 to +53
handleUnknownError(error);
setTimeout(() => {
this.handleWebsocketOpen();
}, WEB_SOCKET_RECONNECT_TIMEOUT);
}
Copy link
Contributor

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
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
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
Copy link

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