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

Websocket disconnects automatically after 30 seconds #243

Open
mohammadmirdar opened this issue Dec 14, 2022 · 3 comments
Open

Websocket disconnects automatically after 30 seconds #243

mohammadmirdar opened this issue Dec 14, 2022 · 3 comments

Comments

@mohammadmirdar
Copy link

Hi! I have an issue with this library. It disconnects after 30 seconds. I also tried to setPingInterval to 60 seconds but it closed automatically with close error 1000.

@kvhadzhiev
Copy link

Try setting the underlying TCP connection's timeout through WebSocketFactory.setConnectionTimeout()

Check if the software at the other end of your WebSocket channel has configurable ping interval (for example, browsers might not support it).

Finally, check if some firewall is killing idle connections.

@mohammadmirdar
Copy link
Author

Thanks for your answer. I implemented this library in android and set all of this methods that you mentioned. but still, i see that socket disconnects after 30 seconds

@kvhadzhiev
Copy link

It could be something Android specific then. Here is SO question and solution regarding a similar 30 seconds disconnect on Android.

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

2 participants