mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
[MQTT] Fix duplicate call task PLUGIN_READ at MQTT connect
This commit is contained in:
@@ -264,7 +264,7 @@ void scheduleNextMQTTdelayQueue() {
|
||||
}
|
||||
}
|
||||
|
||||
void schedule_all_tasks_using_MQTT_controller() {
|
||||
void schedule_all_MQTTimport_tasks() {
|
||||
controllerIndex_t ControllerIndex = firstEnabledMQTT_ControllerIndex();
|
||||
|
||||
if (!validControllerIndex(ControllerIndex)) { return; }
|
||||
@@ -280,15 +280,6 @@ void schedule_all_tasks_using_MQTT_controller() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (taskIndex_t task = 0; task < TASKS_MAX; task++) {
|
||||
if (Settings.TaskDeviceSendData[ControllerIndex][task] &&
|
||||
Settings.ControllerEnabled[ControllerIndex] &&
|
||||
Settings.Protocol[ControllerIndex])
|
||||
{
|
||||
Scheduler.schedule_task_device_timer_at_init(task);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void processMQTTdelayQueue() {
|
||||
@@ -340,7 +331,7 @@ void updateMQTTclient_connected() {
|
||||
MQTTclient_must_send_LWT_connected = false;
|
||||
} else {
|
||||
// Now schedule all tasks using the MQTT controller.
|
||||
schedule_all_tasks_using_MQTT_controller();
|
||||
schedule_all_MQTTimport_tasks();
|
||||
}
|
||||
if (Settings.UseRules) {
|
||||
if (MQTTclient_connected) {
|
||||
|
||||
@@ -32,7 +32,7 @@ void runEach30Seconds();
|
||||
#ifdef USES_MQTT
|
||||
|
||||
void scheduleNextMQTTdelayQueue();
|
||||
void schedule_all_tasks_using_MQTT_controller();
|
||||
void schedule_all_MQTTimport_tasks();
|
||||
|
||||
void processMQTTdelayQueue();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user