socket.io-client-java icon indicating copy to clipboard operation
socket.io-client-java copied to clipboard

Socket not listen in random cases

Open rohitvolumetree opened this issue 4 years ago • 2 comments

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.

rohitvolumetree avatar Oct 20 '21 13:10 rohitvolumetree

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?

darrachequesne avatar Oct 21 '21 08:10 darrachequesne

@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.

rohitvolumetree avatar Oct 21 '21 14:10 rohitvolumetree