Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Disconnect when receiving messages

Hello everybody,

I'm trying to use the mqtt paho library in an Android application for usage with a mosquitto server.
I eventually was able to solve all the issues wrt write permissions on Android directories, uses-permissions in the manifest and so on, but now each time the device receives a message, the client is disconnected with a message on the mosquitto server like this

Socket read error on client 0001, disconnecting.

Then the client has to reconnect and possibly to re-subscribe to all its topics.
My workaround is to re-connect and re-subscribe in the MqttCallback.ConnectionLost, but it is of course only a workaround.

Has anybody found a similar issue in implementing paho library?
If needed I can provide my code, but it is a very basic implementation of the paho client.

I add that the same issue is not present when I connect via other clients (e.g., mosquitto).

Back to the top