[Client] Release room-join join markers when a command times out (#7348)
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 26 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions

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 <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-09-24 18:40:37 +02:00 • committed by GitHub
parent a9b38ec0e1
commit 0955388d50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();
}
}