I am working on MQTT code(tuanpmt ) and I want to disconnect the MQTT after the data is being post to broker via Mosquitto to the server.
MQTT: Sending, type: 3, id: 0000
TCP: Sent
MQTT: Published
MQTT: Sending, type: 3, id: 0000
TCP: Sent
MQTT: Published
MQTT: Sending, type: 3, id: 0000
TCP: Sent
MQTT: Published
MQTT: Sending, type: 3, id: 0000
TCP: Sent
MQTT: Published
MQTT: Send keepalive packet to 10.10.10.127:1883!
MQTT: Sending, type: 12, id: 0000
TCP: Sent
TCP: data received 2 bytes
TCP: Disconnected callback
MQTT: Disconnected
After it mentioning disconnect on console it again transmit the same data and it goes on continously.I want to disconnect it and continue to main loop.How it can be possible?