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

WSS Server: succeeded firstly then failed afterwards with chrome/IOS #958

Closed
jiangjianping opened this issue Dec 16, 2019 · 8 comments
Closed

Comments

@jiangjianping
Copy link

We are running this wss server under android. There is no any problem to connect with this server using wss client under android. The wss client of chrome can also work with this server firstly. But if we close the wss connection and connect with this WSS server again, it failed mostly. We found that the chrome omitted the "Client Key Exchange..." after the first established connection. The IOS websocket client had the same problem.

@PhilipRoman
Copy link
Collaborator

Can you provide some code or application which reproduces this issue?

@jiangjianping
Copy link
Author

Hello,
I attached the packet captured by wireshark. In my opinion, The server may tell the client it can cache the session(key), but the time is very short. The connection created by chrome had "client key exchange..." firstly, then we close this connection and open the websocket connection with wss server again, the "client key exchange..." missed.

noclientkeyexchange
withclientkeyexchange

@jiangjianping
Copy link
Author

the code we use is just the SSLServerExample.java. The problem is due to session reuse.

@jiangjianping
Copy link
Author

jiangjianping commented Dec 17, 2019

We patched with the code from #943 , It seemed that the problem was solved. It is reasonable that the chrome not use False Start firstly, but session reuse will have the same effect as " False Fast" afterwards.

@majorasmask9
Copy link

I appear to be experiencing the same issue as you. Implenting the bug fix you linked to has appeared to significantly reduce the number of failed connections, but I still do occasionally have issues whenever I restart the server. Totally ballparking here: I'd say before that bug fix, I'd experience issues 4/5 times, but afterward it's closer to 1/10 times. I can't really contribute any solutions or possible reasons as to what could be causing the issue, but figured I'd mention it at the very least.

@junaidnom
Copy link

junaidnom commented Feb 18, 2020

I'm having similar issues. Not sure what it is.

Also the issue NEVER occurs when I use a java client, only JS client with browser.

Edit I found I got this error: The connection was closed because the other endpoint did not respond with a pong in time. For more information check: https://github.com/TooTallNate/Java-WebSocket/wiki/Lost-connection-detection
After onOpen is called.

@marci4
Copy link
Collaborator

marci4 commented Feb 19, 2020

@junaidnom you should report this error to the developer of the other endpoint.
The response to a ping is required by the specification!

Best regards,
Marcel

@marci4
Copy link
Collaborator

marci4 commented Sep 26, 2020

Closing issue as it was solved with #943

@marci4 marci4 closed this as completed Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants