From 4bfede1342dc8fcbe7830646f5b1a20b9cc2d27d Mon Sep 17 00:00:00 2001 From: Matt Arant Date: Tue, 6 Oct 2026 18:34:51 +0000 Subject: [PATCH] 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, 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 --- TCPServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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());