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 <noreply@anthropic.com>
This commit is contained in:
Isaac Connor
2026-02-23 13:44:17 -05:00
parent d23860ab96
commit 4c42e736af

View File

@@ -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++;
}