Hello ,
I get more then 10 fatal errors in 24 hours with 8 different devices,they connect to 2 different servers running mosquitto;
Exception org.eclipse.paho.client.mqttv3.MqttException: Client is not connected
org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException (ExceptionHelper.java:31)
org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait (ClientComms.java:143)
org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish (MqttAsyncClient.java:858)
org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish (MqttAsyncClient.java:822)
org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish (MqttAsyncClient.java:829)
anywheresoftware.b4j.objects.MqttAsyncClientWrapper.Publish2 (MqttAsyncClientWrapper.java:100)
I have tried If Client.connected then etc and i have tried to create a boolean when the MQTT connection is made then true and if client disconnected the boolean is false.
Somehow the client.connected does not work reliable ,
I do not know what else to do to check if the client is connected is valid before publishing a message.
Are there others that have the same problem with the B4A MQTT library?
Regards
Philip
I get more then 10 fatal errors in 24 hours with 8 different devices,they connect to 2 different servers running mosquitto;
Exception org.eclipse.paho.client.mqttv3.MqttException: Client is not connected
org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException (ExceptionHelper.java:31)
org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait (ClientComms.java:143)
org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish (MqttAsyncClient.java:858)
org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish (MqttAsyncClient.java:822)
org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish (MqttAsyncClient.java:829)
anywheresoftware.b4j.objects.MqttAsyncClientWrapper.Publish2 (MqttAsyncClientWrapper.java:100)
I have tried If Client.connected then etc and i have tried to create a boolean when the MQTT connection is made then true and if client disconnected the boolean is false.
Somehow the client.connected does not work reliable ,
I do not know what else to do to check if the client is connected is valid before publishing a message.
Are there others that have the same problem with the B4A MQTT library?
Regards
Philip