forked from espressif/esp-mqtt
esp-mqtt library is unaware of underlying network connectivity states and current auto reconnect mechanism is built around timed retry attempts every MQTT_RECONNECT_TIMEOUT_MS. As application code usually keeps track of network connectity state export a new function that application can use to request a forced reconnect attempt as soon as connected to the network.