diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2025-09-29 14:47:36 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2025-09-29 14:47:36 +0200 |
commit | 0e45906f27f51f89326de479b7a9cb60fc2920b8 (patch) | |
tree | b65ec00afdce0826fe32bdf5f85a3dbb563b68de /lib/Socket.cpp | |
parent | 87fce948967230707de283b3e7d0e833f00bfad2 (diff) | |
download | dabmod-0e45906f27f51f89326de479b7a9cb60fc2920b8.tar.gz dabmod-0e45906f27f51f89326de479b7a9cb60fc2920b8.tar.bz2 dabmod-0e45906f27f51f89326de479b7a9cb60fc2920b8.zip |
common 53fdfd2: Fix race condition in TCPDataDispatcher get_statsnext
Diffstat (limited to 'lib/Socket.cpp')
-rw-r--r-- | lib/Socket.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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<TCPConnection::stats_t> TCPDataDispatcher::get_stats() const { std::vector<TCPConnection::stats_t> s; + auto lock = unique_lock<mutex>(m_mutex); for (const auto& conn : m_connections) { s.push_back(conn.get_stats()); } |