[client] lgmp: skip release after session loss
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled

Heartbeat expiry does not change the LGMP session ID. Queue operations
can therefore accept ownership releases into stale shared memory after
a guest reboot, where no host remains to advance the acknowledgement
serial.

Skip graceful clipboard and input ownership release when the session is
already invalid. Keep the existing timeout and warning for a live host
that fails to process the release.
This commit is contained in:
Geoffrey McRae
2026-08-16 05:03:58 +10:00
parent 20b2225c69
commit 90c898f9c7
2 changed files with 4 additions and 2 deletions

View File

@@ -907,7 +907,8 @@ static void logStats(const struct LGMPInputCounters * stats)
static void releaseOnDisconnect(LGMPInput * input)
{
if (!input->queue || !input->stream || !input->publishedClaimed ||
!input->publishedGeneration)
!input->publishedGeneration ||
!lgmpClientSessionValid(input->client))
return;
KVMFRInputMessage message =