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

WebSocketClient.closeBlocking() will wait for 7 minutes on service #1317

Open
hytTony opened this issue Mar 15, 2023 · 0 comments
Open

WebSocketClient.closeBlocking() will wait for 7 minutes on service #1317

hytTony opened this issue Mar 15, 2023 · 0 comments

Comments

@hytTony
Copy link

hytTony commented Mar 15, 2023

I used closeBlocking() to close the websocket, it works correct on activity. Now i move these code to back service, then it will block about 7 minutes on closeBlocking().

Sure, i can close it without bolcking, such as close(), or close it in another thread. But it just release the thread, the websocket still be blocked, it cann't be used before it closed ( It will not work even new another websocket).

my code like this:
clientSocket = new JWebSocketClient(uri, httpHeaders){...}; clientSocket.setConnectionLostTimeout(220); clientSocket.connectBlocking(2, TimeUnit.MINUTES);

and close it like this:
clientSocket.closeBlocking();

What is the problem, if there are solve solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant