JFJochReceiverRugnux: after a cancel, an analysed frame still waits for a send slot
A cancel promises that the frames already received are analysed, merged and written, but the wait for a slot gave up on cancelled, so the first frame after a cancel to find the image buffer full was lost. The wait keeps its bound of 2 s, which is what protects the teardown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
This commit is contained in:
1 parent
b156c12981
commit
af58500900
1 file changed
+1
-1
@@ -504,7 +504,7 @@ ZeroCopyReturnValue *JFJochReceiverRugnux::AnalysedImageSlot() {
|
||||
constexpr auto WRITER_WAIT = std::chrono::seconds(2);
|
||||
const auto t0 = std::chrono::steady_clock::now();
|
||||
auto loc = image_buffer.GetImageSlot();
|
||||
while (loc == nullptr && !cancelled && std::chrono::steady_clock::now() - t0 < WRITER_WAIT) {
|
||||
while (loc == nullptr && std::chrono::steady_clock::now() - t0 < WRITER_WAIT) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
loc = image_buffer.GetImageSlot();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user