Adjust command ``NoDelay``

This commit is contained in:
Theo Arends 2020-10-15 15:33:17 +02:00
parent 98d2dd8f39
commit 074aec0a23
2 changed files with 3 additions and 2 deletions

View File

@ -344,6 +344,7 @@ void CmndBacklog(void)
}
// ResponseCmndChar(D_JSON_APPENDED);
mqtt_data[0] = '\0';
backlog_delay = 0;
} else {
bool blflag = BACKLOG_EMPTY;
#ifdef SUPPORT_IF_STATEMENT

View File

@ -333,8 +333,8 @@ void BacklogLoop(void) {
#endif
nodelay_detected = !strncasecmp_P(cmd.c_str(), PSTR(D_CMND_NODELAY), strlen(D_CMND_NODELAY));
if (nodelay_detected) { nodelay = true; }
} while (nodelay_detected);
ExecuteCommand((char*)cmd.c_str(), SRC_BACKLOG);
} while (!BACKLOG_EMPTY && nodelay_detected);
if (!nodelay_detected) { ExecuteCommand((char*)cmd.c_str(), SRC_BACKLOG); }
if (nodelay) { backlog_delay = 0; } // Reset backlog_delay which has been set by ExecuteCommand (CommandHandler)
backlog_mutex = false;
}