From 45165b7ce758d8b170fa8efc86b9183b361c9317 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 24 Jan 2023 13:38:41 +0000 Subject: [PATCH] Bug 32393: (QA follow-up) Add explicit undef response in two catch blocks Do not implicitly depend on last statement returning nothing. Make it explicit. We want $args to be null here. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 08cc23626c30a61254eddd552f6b23253876d753) Signed-off-by: Matt Blenkinsop (cherry picked from commit 223583d3b59295259d48417fb00e9b4c4e86294d) Signed-off-by: Lucas Gass --- misc/background_jobs_worker.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/background_jobs_worker.pl b/misc/background_jobs_worker.pl index 44f7990ed4..a9a037ed76 100755 --- a/misc/background_jobs_worker.pl +++ b/misc/background_jobs_worker.pl @@ -99,6 +99,7 @@ while (1) { decode_json($body); # TODO Should this be from_json? Check utf8 flag. } catch { Koha::Logger->get->warn(sprintf "Frame not processed - %s", $_); + return; } finally { $conn->ack( { frame => $frame } ); }; @@ -124,6 +125,7 @@ while (1) { } catch { Koha::Logger->get->warn(sprintf "Cannot decode data for job id=%s", $job->id); $job->status('failed')->store; + return; }; next unless $args; -- 2.39.5