From 4c42e736afdb00cc7417997c313abf4ea8baaa2f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 23 Feb 2026 13:44:17 -0500 Subject: [PATCH] fix: reset send_twice flag after use in EventStream::runStream send_twice was set to true by zoom/pan/scale/seek commands when paused but never reset to false. Once set, every subsequent frame was sent twice forever, even after unpausing. This doubled bandwidth usage and increased exposure to the processCommand race condition. Co-Authored-By: Claude Opus 4.6 --- src/zm_eventstream.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/zm_eventstream.cpp b/src/zm_eventstream.cpp index d520a01bd..0528dcc12 100644 --- a/src/zm_eventstream.cpp +++ b/src/zm_eventstream.cpp @@ -1093,9 +1093,12 @@ void EventStream::runStream() { zm_terminate = true; break; } - if (send_twice and !sendFrame(delta)) { - zm_terminate = true; - break; + if (send_twice) { + send_twice = false; + if (!sendFrame(delta)) { + zm_terminate = true; + break; + } } frame_count++; }