Adds a new macro WOLFMQTT_USE_CB_ON_DISCONNECT that allows the client's registered disconnect callback to be triggered when MqttClient_Disconnect_ex is called. The CB is normally only used to process an error condition when MqttPacket_HandleNetError is called.
This addresses a feature request from ZD14399
Test with
./configure CFLAGS="-DWOLFMQTT_USE_CB_ON_DISCONNECT"
make
./examples/mqttclient/mqttclient
Adds a new macro
WOLFMQTT_USE_CB_ON_DISCONNECT
that allows the client's registered disconnect callback to be triggered whenMqttClient_Disconnect_ex
is called. The CB is normally only used to process an error condition whenMqttPacket_HandleNetError
is called.This addresses a feature request from ZD14399
Test with
Observe disconnect CB is executed: