From 0e45906f27f51f89326de479b7a9cb60fc2920b8 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 29 Sep 2025 14:47:36 +0200 Subject: common 53fdfd2: Fix race condition in TCPDataDispatcher get_stats --- lib/Socket.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/Socket.cpp') diff --git a/lib/Socket.cpp b/lib/Socket.cpp index 5c920d7..33c9c73 100644 --- a/lib/Socket.cpp +++ b/lib/Socket.cpp @@ -1152,6 +1152,7 @@ void TCPDataDispatcher::process() std::vector TCPDataDispatcher::get_stats() const { std::vector s; + auto lock = unique_lock(m_mutex); for (const auto& conn : m_connections) { s.push_back(conn.get_stats()); } -- cgit v1.2.3