I connected to MQTT broker using Mosquitto C client libraray.
I used below code for connection.
ret = mosquitto_connect (mosq, MQTT_HOSTNAME, MQTT_PORT, 0);
After connecting to broker I stopped the broker service.
Now I tried to publish message using below code.
ret = mosquitto_publish (mosq, NULL,topic, strlen (text), text, 1, 1);
Eventhough the broker is running, mosquitto_publish API returns success. When calling mosquitto_publish API second time, it returns 14.
Why mosquitto_publish returns success evethough the broker is running?How to fix this issue?
Thanks in advance.