From af585009009bc1ca81bc64301d6e816ee3568723 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sat, 7 Nov 2026 17:56:18 +0100 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK --- receiver/JFJochReceiverRugnux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/receiver/JFJochReceiverRugnux.cpp b/receiver/JFJochReceiverRugnux.cpp index 6538fc356..042b10d60 100644 --- a/receiver/JFJochReceiverRugnux.cpp +++ b/receiver/JFJochReceiverRugnux.cpp @@ -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(); }