Open bluelu opened 4 years ago
Unfortunately I also managed to get the hanging threads with multiple threads and the synchronize on connectBlocking. It just seems to happen less often, thus probably a race condition somewhere.
Hello Everyone,
Is there any planning to resolve this issue in any upcoming releases?
Hi,
One of the clients will hang forever on creating the connection to the server when multiple threads are used and the SSL Context is used:
park:-1, Unsafe (jdk.internal.misc) park:194, LockSupport (java.util.concurrent.locks) parkAndCheckInterrupt:885, AbstractQueuedSynchronizer (java.util.concurrent.locks) doAcquireSharedInterruptibly:1039, AbstractQueuedSynchronizer (java.util.concurrent.locks) acquireSharedInterruptibly:1345, AbstractQueuedSynchronizer (java.util.concurrent.locks) await:232, CountDownLatch (java.util.concurrent) connectBlocking:367, WebSocketClient (org.java_websocket.client)
There is no issue if:
Please see below (it sets up the sslcontext as described in your example) which will reproduce the problem. (It will output forever waiting for future)
Link to example to recreate issue: https://pastebin.com/hF5kpqyE