[Client] Release room-join join markers when a command times out (#7348)

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

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