Hi,
In the new AzureIotHub library, subsys\net\lib\azure_iot_hub\src\azure_iot_hub.c
the logic for handling connection conditions in mqtt_evt_handler requires more error handling. When mqtt_evt->type == MQTT_EVT_CONNACK and mqtt_evt->param.connack.return_code != MQTT_CONNECTION_ACCEPTED, the application has no idea that a failure has occurred and so can't recover. Can you add a new AZURE_IOT_HUB_EVT_CONNECTION_FAILURE event code and call azure_iot_hub_notify_event(&evt); within that if(...) check?
Thanks!