From 9eb4a241658cd5187d73560abbc8fb8f98c4f055 Mon Sep 17 00:00:00 2001 From: acetone Date: Mon, 21 Nov 2022 16:06:40 +0300 Subject: [PATCH] dead lock fixed --- src/statistics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/statistics.cpp b/src/statistics.cpp index 7dbbb5e..b9f5199 100644 --- a/src/statistics.cpp +++ b/src/statistics.cpp @@ -51,9 +51,9 @@ void Statistics::report(const LogEvent& event) } m_lastDestinationsMtx.lock(); - if (not lastDestinations().contains(event.dest)) + if (not m_lastDestinations.contains(event.dest)) { - if (lastDestinations().size() >= static_cast(g::p::LAST_AND_TOP_LIST_SIZE)) + if (m_lastDestinations.size() >= static_cast(g::p::LAST_AND_TOP_LIST_SIZE)) { m_lastDestinations.pop_back(); }