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

Console warning on WSS close #1

Open
grctest opened this issue Sep 19, 2023 · 0 comments
Open

Console warning on WSS close #1

grctest opened this issue Sep 19, 2023 · 0 comments

Comments

@grctest
Copy link
Contributor

grctest commented Sep 19, 2023

When a websocket is closed, an error message is logged in the console:

undefined
error: wss connection closed

This is because of the following lines in the ChainWebSocket:

 // in onClose function:

    for (var cbId = this.responseCbId + 1; cbId <= this.cbId; cbId += 1) {
      this.callbacks[cbId].reject("wss connection closed");
    }

  .......

  login = (user, password) => this.connect_promise.then(() => this.call([1, "login", [user, password]]));

So we could change the onClose function to avoid throwing an error on WSS closure. Resolving instead of rejecting isn't an option neither.

Upside is this isn't blocking, just cosmetic.

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