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

Request id is global in WsJsonRpcConnector #18

Open
popra opened this issue Oct 22, 2020 · 0 comments
Open

Request id is global in WsJsonRpcConnector #18

popra opened this issue Oct 22, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@popra
Copy link
Collaborator

popra commented Oct 22, 2020

using globals is a fairly well documented antipattern that we should avoid at all cost.

In this particular case, if the app is connected to 2 websockets they will bork each others request ids:
https://github.com/filecoin-shipyard/filecoin.js/blob/master/src/connectors/WsJsonRpcConnector.ts#L12

@popra popra added the bug Something isn't working label Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants