From 3bfaf3e9ae30858bace63ab25e10948fe2544ff7 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 18 Nov 2025 17:37:36 -0500 Subject: [PATCH] Provide backtrace in setScale. Only start streamCmdTimer if stream is started (a status update can be in flight while we stop. --- web/js/MonitorStream.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index 807f92bd2..2aa4ba771 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -199,7 +199,7 @@ function MonitorStream(monitorData) { console.log('No stream in setScale'); return; } - console.log("setScale", stream, newscale, width, height, param); + console.trace("setScale", stream, newscale, width, height, param); if (height == '0px') { console.error("Don't want to set 0px height. Reverting to auto"); height = 'auto'; @@ -1178,7 +1178,7 @@ function MonitorStream(monitorData) { } // end if have a new auth hash } // end if has state - if (!this.streamCmdTimer) { + if (this.started && !this.streamCmdTimer) { // When using mode=paused, we don't get the onload event. This is just an extra check to make sure that streamCmdQuery is running console.log('starting streamCmd for monitor ID='+this.id+' connKey='+this.connKey+' in '+statusRefreshTimeout + 'ms'); this.streamCmdTimer = setInterval(this.streamCmdQuery.bind(this), statusRefreshTimeout); @@ -1198,7 +1198,7 @@ function MonitorStream(monitorData) { stream.src = src; } } // end if Ok or not - }; + }; // this.getStreamCmdResponse /* getStatusCmd is used when not streaming, since there is no persistent zms */ this.getStatusCmdResponse=function(respObj, respText) {