diff --git a/src/main.cpp b/src/main.cpp index 64fef89..4375aa2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -352,6 +352,7 @@ void ICACHE_FLASH_ATTR sendValues() { WiFiClientSecure net; MQTTClient mqttclient(MQTT_MAX_PACKET_SIZE); + net.setInsecure(); mqttclient.begin(mqttserver, 8883, net); int tries = 0; constexpr unsigned int retry_delay = 500; @@ -389,6 +390,7 @@ void ICACHE_FLASH_ATTR sendValues() { } loop_count++; + net.stop(); WiFi.disconnect(); WiFi.mode(WIFI_OFF); WiFi.forceSleepBegin();