mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-31 12:29:14 +03:00
fix many bugs
This commit is contained in:
7
mqtt.ino
7
mqtt.ino
@@ -38,7 +38,8 @@ void MQTT_init() {
|
||||
jsonWrite(configSetup, "mqttPass", request->getParam("mqttPass")->value());
|
||||
}
|
||||
saveConfig();
|
||||
start_connection = true;
|
||||
start_connecting_to_mqtt = true;
|
||||
|
||||
request->send(200, "text/text", "ok");
|
||||
});
|
||||
|
||||
@@ -51,8 +52,8 @@ void MQTT_init() {
|
||||
}
|
||||
|
||||
void handle_connection() {
|
||||
if (start_connection) {
|
||||
start_connection = false;
|
||||
if (start_connecting_to_mqtt) {
|
||||
start_connecting_to_mqtt = false;
|
||||
client.disconnect();
|
||||
MQTT_Connecting();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user