diff --git a/TCPServer.cpp b/TCPServer.cpp index 46e98be..7f6f29e 100644 --- a/TCPServer.cpp +++ b/TCPServer.cpp @@ -108,7 +108,7 @@ namespace core { // below would deadlock on this non-recursive mutex. std::vector stale; { - std::lock_guard guard(lock); + std::lock_guard guard(lock); for (auto &s : sessions) if (!s->hasReceivedData && (now - s->acceptedAt) > GRACE_PERIOD) stale.push_back(s.get());