-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
error occurs in IE11 and edge when connection is closed #36
Comments
How are you constructing the Sockette instance? Are you using Thanks! |
I use Sockette with npm package `import Sockette from "sockette"; this.ws = new Sockette( Thanks! |
@houyaowei Try this: this.ws ? this.ws.close(1000) : null Unrelated, but when the onmaximum: e => {
- that.ws.reconnect;
+ this.ws.open();
}, |
@lukeed I know this issue is closed, but it seems a bit concerning that the default close Could we make it so that the
|
@elliotaplant Thanks, this actually matches what I had thought initially, but I changed it to Thanks! |
I can verify that tomorrow! |
Sending I'm pretty busy right now but I could make a PR for this in January. If you want to make the change, I think it would just be: // src/index.js
...
- $.close = function (x, y) {
- ws.close(x || 1005, y);
- };
+ $.close = ws.close
... |
Awesome, thank you 🙇 It cannot be your suggestion because the internal Plus, |
Environment: React 16.2, webpack 4.10, sockette 2.0.0
in the react lifecycle method componentWillUnmount method, I will close the socket instance , the error occurs ,
the code blow
![_20180927181119](https://user-images.githubusercontent.com/3080429/46139288-c0243180-c280-11e8-9b3f-b0fd28104e9a.png)
error blow
![_20180927181225](https://user-images.githubusercontent.com/3080429/46139384-fa8dce80-c280-11e8-8719-7b1f0cd4f8b5.png)
![_20180927181247](https://user-images.githubusercontent.com/3080429/46139385-fb266500-c280-11e8-8b99-a29b97e8bc25.png)
when I add annotation to the ws close method , it get ok,
![_20180927181606](https://user-images.githubusercontent.com/3080429/46139566-7851da00-c281-11e8-94d4-29b9bc73f549.png)
How can I fix this problem , thx.
The text was updated successfully, but these errors were encountered: