From 0955388d5041d979476ce880e67f423e57b1bb7f Mon Sep 17 00:00:00 2001 From: BruebachL <44814898+BruebachL@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:40:37 +0200 Subject: [PATCH] [Client] Release room-join join markers when a command times out (#7348) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RemoteClient's ping sweep deleted timed-out pending commands without emitting finished, so TabServer's in-flight room-join markers were never released: the room stayed silently unjoinable for the rest of the session even though the connection stayed alive. Answer swept commands with RespNotConnected instead of dropping them, matching the disconnect cleanup, so every awaiter gets a deterministic terminal response. Co-authored-by: Lukas BrĂ¼bach --- .../network/client/remote/remote_client.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libcockatrice_network/libcockatrice/network/client/remote/remote_client.cpp b/libcockatrice_network/libcockatrice/network/client/remote/remote_client.cpp index 53608db65..de2cc720f 100644 --- a/libcockatrice_network/libcockatrice/network/client/remote/remote_client.cpp +++ b/libcockatrice_network/libcockatrice/network/client/remote/remote_client.cpp @@ -559,6 +559,15 @@ void RemoteClient::ping() PendingCommand *pend = i.next().value(); if (pend->tick() > maxTimeout) { i.remove(); + // Answer the command instead of dropping it silently: the connection may still + // be alive (other traffic keeps lastDataReceived fresh) while this single + // command stalled, and awaiters such as TabServer's room-join dedup can only + // release their in-flight markers when `finished` fires. A silent drop wedges + // them permanently - e.g. a room whose join timing never surfaces again. + Response response; + response.set_response_code(Response::RespNotConnected); + response.set_cmd_id(pend->getCommandContainer().cmd_id()); + pend->processResponse(response); pend->deleteLater(); } }