network port delay

This commit is contained in:
Siwat Sirichai 2024-05-17 22:15:06 +07:00
parent 487e4068e8
commit ab0c340014
1 changed files with 1 additions and 0 deletions

View File

@ -77,6 +77,7 @@ void setup()
// Connect to the MQTT Broker
ESP_LOGV("CUD IoT OS", "Connecting to MQTT Broker");
espmega.iot->loadMqttConfig();
vTaskDelay(3000 / portTICK_PERIOD_MS); // Wait for the network to stabilize
espmega.iot->connectToMqtt();
// Enable Web Server
ESP_LOGV("CUD IoT OS", "Enabling Web Server");