From 8c1ebe35fdc2b21fa78088291817d2ad2ffb84af Mon Sep 17 00:00:00 2001 From: Alex P Date: Thu, 23 Oct 2025 11:47:30 +0300 Subject: [PATCH] fix: primary session timeout not tracking RPC activity The primary session inactivity timeout was only tracking HID-related activity (keyboard, mouse, mass storage) but not general RPC messages. This meant users watching video or interacting with the UI would be timed out even though they were actively using the session. Added UpdateLastActive call in onRPCMessage to track any valid RPC activity, ensuring all user interactions reset the inactivity timer. --- jsonrpc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jsonrpc.go b/jsonrpc.go index 14e3bcfa..6aa72263 100644 --- a/jsonrpc.go +++ b/jsonrpc.go @@ -179,6 +179,9 @@ func onRPCMessage(message webrtc.DataChannelMessage, session *Session) { return } + // Update last active timestamp for any valid RPC activity + sessionManager.UpdateLastActive(session.ID) + var request JSONRPCRequest err := json.Unmarshal(message.Data, &request) if err != nil {