From 3450e675eaea09553eb2fa47c1d6e5be86f5320a Mon Sep 17 00:00:00 2001
From: Giovanna Lazzari Miotto <giovanna.lazzari.miotto@cern.ch>
Date: Tue, 27 Feb 2024 16:51:22 +0100
Subject: [PATCH] Maybe: OR => AND on conditions to close&rename

---
 src/OutputFileHandler.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/OutputFileHandler.cc b/src/OutputFileHandler.cc
index fe658782..44ca1b23 100644
--- a/src/OutputFileHandler.cc
+++ b/src/OutputFileHandler.cc
@@ -149,7 +149,7 @@ std::string OutputFileHandler::format_filename(uint32_t run_number, uint32_t ind
 
 void OutputFileHandler::close_and_rename::operator()() const {
   OutputFile outputFile;
-  while (file_handler_running_ || (files_to_close_.size() > 0)) {
+  while (file_handler_running_ && (files_to_close_.size() > 0)) {
     LOG(TRACE) << "try pop now. queue size now " << files_to_close_.size();
     try {
       files_to_close_.pop(outputFile);
-- 
GitLab