TakahikoKawasaki / nv-websocket-client

High-quality WebSocket client implementation in Java.
Apache License 2.0
2.03k stars 292 forks source link

The websocket gets stuck on connecting with network issues #213

Closed fratik closed 3 years ago

fratik commented 3 years ago

While having weird network issues, the connection process can get stuck in a read operation at random points, like com.neovisionaries.ws.client.SocketConnector.verifyHostname(SocketConnector.java:271) or com.neovisionaries.ws.client.HandshakeReader.readStatusLine(HandshakeReader.java:86), which never timeout, even with a connectTimeout of 10 seconds (https://github.com/DV8FromTheWorld/JDA/issues/1437#issuecomment-723320605).

osfunapps commented 3 years ago

Same problem for me. I don't really understand how people can use the library. If the user tries to connect to a device it sometimes stuck and sometimes the timeout works.

I guess everyone just set an external timeout to kill the socket? or not handling any connect exceptions at all

Kodehawa commented 3 years ago

Same problem here. Just ran into this.