Closed svalaskevicius closed 1 year ago
I closed the connection in following manner, but I don't think this is the grace full approach. private static final CountDownLatch responseLatch = new CountDownLatch(1);
`public static void main(String[] args) throws Exception { MYWebSocketClient myWebSocketClient = new MYWebSocketClient(new URI( "wss://.../"));
myWebSocketClient.connectBlocking(30, TimeUnit.SECONDS);
responseLatch.await(1, TimeUnit.SECONDS);
myWebSocketClient.closeBlocking();
}`
Yes, close() and closeBlocking() are the correct ways to close a socket. Are you getting any specific problems? I just checked, and no threads are left hanging.
hmm thanks! looks like it might have been a problem on my side - retrying a connection multiple times due to a threading issue..
Describe what you would like to know or do
Hi, I cannot find a proper way to close the connection fully from the client side:
Describe the solution you'd considered
reset()
method could be niceAdditional context