Skip to content

Commit 655330d

Browse files
committed
remove stupid "live forever" default
1 parent 3c30edb commit 655330d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

wled00/json.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,13 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
560560
if (root["live"].as<bool>()) {
561561
transitionDelayTemp = 0;
562562
jsonTransitionOnce = true;
563+
#ifdef WLED_ENABLE_JSONLIVE
564+
// infinite timeout only when JSON LIVE leds preview is enabled
563565
realtimeLock(65000);
566+
#else
567+
// more meaningful timeout : use configurable timeout; *3 for some safety margin without staying "live" forever
568+
realtimeLock(realtimeTimeoutMs *3); // Use configurable timeout like other protocols
569+
#endif
564570
} else {
565571
exitRealtime();
566572
}

0 commit comments

Comments
 (0)