-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
ReconnectClientExample does not work with wss #825
Comments
Hello @AlexisBrito, can your issue be related to #764 ? Best regards, |
@AlexisBrito any update? |
Hi @marci4, Sorry for the delayed reply. I'm not sure it can, since in my code, I'm already creating a socket factory... I can't really look into this at the moment so I'm going to share the whole code and hopefully you know where the issue is (if there is any): public class SSLClientExample {
} |
Remove system exit causing TooTallNate#825
Hey @AlexisBrito, It simple does not work since there is a System.exit(0) when the client disconnects from the server (see https://github.com/TooTallNate/Java-WebSocket/blob/master/src/main/example/SSLClientExample.java#L63). Best regards, |
Hey @marci4, Thanks a lot! It's working :D Best regards! |
If I merge the SSLClientExample.java and ReconnectClientExample.java, the program will end after it closes the connection with the server, not having a chance to do reconnectBlocking();
Starting from the SSLClientExample.java, after the c.connectBlocking();, if I copy and paste this:
c.send( "hi" );
Thread.sleep( 10 );
c.closeBlocking();
//Disconnect manually and reconnect blocking
c.reconnectBlocking();
c.send( "it's" );
Thread.sleep( 10000 );
c.closeBlocking();
//Disconnect manually and reconnect
c.reconnect();
Thread.sleep( 100 );
c.send( "me" );
Thread.sleep( 100 );
c.closeBlocking();
It will only display "hi", but it should display "hi it's me".
The text was updated successfully, but these errors were encountered: