hardening iterator

This commit is contained in:
mittwerk 2024-10-28 09:11:09 +02:00
parent 43939cedf4
commit 8f9874570a
No known key found for this signature in database
GPG Key ID: 2B26F0EEF5ED5122

View File

@ -203,7 +203,7 @@ namespace client
std::vector<std::shared_ptr<DatagramSessionInfo> > sessions;
std::lock_guard<std::mutex> lock (m_SessionsMutex);
for (auto it: m_Sessions)
for (const auto &it: m_Sessions)
{
auto s = it.second;
if (!s->m_Destination) continue;