From 23ef309d0a43519a815a8b0b1bf7b5178aa38247 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Sun, 1 May 2022 11:10:15 +0200 Subject: [PATCH] Don't print the first "Waiting for score threads to complete" Looks nicer IMO if you don't show the message if there's no actual waiting. --- src/engine/server/databases/connection_pool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/server/databases/connection_pool.cpp b/src/engine/server/databases/connection_pool.cpp index f782df5a0..ff03c45a0 100644 --- a/src/engine/server/databases/connection_pool.cpp +++ b/src/engine/server/databases/connection_pool.cpp @@ -109,8 +109,10 @@ void CDbConnectionPool::OnShutdown() while(m_Shutdown.load()) { // print a log about every two seconds - if(i % 20 == 0) - dbg_msg("sql", "Waiting for score-threads to complete (%ds)", i / 10); + if(i % 20 == 0 && i > 0) + { + dbg_msg("sql", "Waiting for score threads to complete (%ds)", i / 10); + } ++i; thread_sleep(100000); }