Add timeout parameter to gui_acquire()

This commit is contained in:
fvanroie 2023-04-14 00:09:26 +02:00
parent 3436cb614d
commit 871a795210

View File

@ -192,7 +192,7 @@ static inline size_t mqtt_msg_length(size_t len)
void mqtt_process_topic_payload(const char* topic, const char* payload, unsigned int length)
{
if(gui_acquire()) {
if(gui_acquire(pdMS_TO_TICKS(30))) {
mqttLoop(); // First empty the MQTT queue
LOG_TRACE(TAG_MQTT_RCV, F("%s = %s"), topic, payload);
dispatch_topic_payload(topic, payload, length > 0, TAG_MQTT);