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

onConnect is called when the WebSocket error event has fired #18

Closed
jackkleeman opened this issue Mar 27, 2017 · 1 comment
Closed

onConnect is called when the WebSocket error event has fired #18

jackkleeman opened this issue Mar 27, 2017 · 1 comment

Comments

@jackkleeman
Copy link

client.js is meant to call onConnect on line 31 if the WebSocket open event fires. The WebSocket error event is listened to by source.js which on line 41 calls the onConnect callback with this event. This means that functions waiting for connection establishment proceed despite the websocket being in an errored state.

@jackkleeman
Copy link
Author

Actually I suspect this is expected behaviour, looks like js-libp2p (a downstream library I work with) wasn't checking for errors when onConnect is called.

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

No branches or pull requests

1 participant