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

Re-open a closed websocket, get an exception of "An unhandled exception of type #99

Open
jliu1970 opened this issue Jul 17, 2017 · 4 comments

Comments

@jliu1970
Copy link

'System.Exception' occurred in SuperSocket.ClientEngine.dll
Additional information: The socket is connected, you needn't connect again! occurred

Hi Kerry,

In an error handling case, our design of the handler of websocket Closed event will try to re-establish the connection. The connection code looks like :

if(!(websocket.state == WebSocketState.Open))
{
websocket.open();
}

In one of the test case, we shut down the websocket server at the server side, it is found that the code does not work all the time, the above exception was thrown in some instances.

When the exception was thrown, we noticed that the websocket.state was closed, as expected.

Any reason why the socket is still connected, when the websocket is closed?

Thanks
Jimmy

@kerryjiang
Copy link
Owner

Could you try the latest version: 0.15?

@jliu1970
Copy link
Author

jliu1970 commented Sep 5, 2017 via email

@offbit-it
Copy link

Same issue here. What can be the cause? @kerryjiang

@nowkin
Copy link

nowkin commented Dec 1, 2017

Same issue for me too also with the latest version. Any news here?

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

4 participants