mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-26 09:42:42 -04:00
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:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user