From 197a89a37a19f8a7114c08264f71aad50ee29589 Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Wed, 12 Oct 2022 03:08:25 -0400 Subject: [PATCH] Only comments changes to better describe buffering cases. --- ui/media/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/media/main.js b/ui/media/main.js index 44c682c6..f2d8d7ae 100644 --- a/ui/media/main.js +++ b/ui/media/main.js @@ -506,7 +506,8 @@ async function doMakeImage(task) { } try { // hack for a middleman buffering all the streaming updates, and unleashing them on the poor browser in one shot. - // this results in having to parse JSON like {"step": 1}{"step": 2}...{"status": "succeeded"..} which is obviously invalid. + // this results in having to parse JSON like {"step": 1}{"step": 2}{"step": 3}{"ste... + // which is obviously invalid and can happen at any point while rendering. // So we need to extract only the next {} section if (finalJSON.length > 0) { // Append new data when required