Fix sweepStaleSessions() lock_guard type after lock became recursive_mutex

Merging upstream TCPServer.h changed lock from std::mutex to
std::recursive_mutex (the ConsoleServer self-deadlock fix); this call
site still hardcoded std::lock_guard<std::mutex>, which no longer
compiles since lock_guard cannot bind to a different mutex type. Uses
the same class-template-argument-deduction form every other lock_guard
in this file already uses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Matt ArantandClaude Sonnet 5 committed 2026-10-06 18:34:51 +00:00
1 parent dc6b1dcc56
commit 4bfede1342
1 file changed
+1 -1
+1 -1
View File
@@ -108,7 +108,7 @@ namespace core {
// below would deadlock on this non-recursive mutex. // below would deadlock on this non-recursive mutex.
std::vector<TCPSession *> stale; std::vector<TCPSession *> stale;
{ {
std::lock_guard<std::mutex> guard(lock); std::lock_guard guard(lock);
for (auto &s : sessions) for (auto &s : sessions)
if (!s->hasReceivedData && (now - s->acceptedAt) > GRACE_PERIOD) if (!s->hasReceivedData && (now - s->acceptedAt) > GRACE_PERIOD)
stale.push_back(s.get()); stale.push_back(s.get());