socketio / socket.io-client-java

Full-featured Socket.IO Client Library for Java, which is compatible with Socket.IO v1.0 and later.
https://socketio.github.io/socket.io-client-java/installation.html
Other
5.32k stars 972 forks source link

Socket not listen in random cases #686

Open rohitvolumetree opened 2 years ago

rohitvolumetree commented 2 years ago

I am using socket dependency "io.socket:socket.io-client:0.8.3" and the server version is 2.3.0.

In our product, we use to emit socket from web panel and Android app listens to it and performs an action, but in random cases, socket does not listen.

Some code snippets are -

private val options by lazy { IO.Options().apply { reconnection = true timeout = 60000 } }

private val socket by lazy { IO.socket(baseUrl, options) }

Need help to resolve this issue.

darrachequesne commented 2 years ago

Unfortunately, this is a bit too vague for us to be able to help you.

Do you know which device/android version is impacted? 0.8.3 is quite an old release, could you please check if that's fixed in recent versions?

rohitvolumetree commented 2 years ago

@darrachequesne Also tried with the latest version but then it starts disconnecting with errors like - Socket error io.socket.engineio.client.EngineIOException: xhr poll error even after adding transports - private val transportsList = arrayOf(Polling.NAME, PollingXHR.NAME, WebSocket.NAME)

We have found one scenario when the user logs in then the sockets do not listen. But when user kills the app and relaunches the app then sockets start listening.