From e99996ca1ad0a057331369f992f4deb52e4a3aa4 Mon Sep 17 00:00:00 2001 From: Stavros Korokithakis Date: Thu, 9 Dec 2021 02:45:20 +0200 Subject: [PATCH] Fix crash on boot --- src/esp8266-vindriktning-particle-sensor.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/esp8266-vindriktning-particle-sensor.ino b/src/esp8266-vindriktning-particle-sensor.ino index 0265ac2..3e932a7 100644 --- a/src/esp8266-vindriktning-particle-sensor.ino +++ b/src/esp8266-vindriktning-particle-sensor.ino @@ -16,7 +16,7 @@ uint8_t mqttRetryCounter = 0; WiFiManager wifiManager; WiFiClient wifiClient; -PubSubClient mqttClient; +PubSubClient mqttClient(wifiClient); WiFiManagerParameter custom_mqtt_server("server", "mqtt server", Config::mqtt_server, sizeof(Config::mqtt_server)); WiFiManagerParameter custom_mqtt_user("user", "MQTT username", Config::username, sizeof(Config::username));