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.
This commit is contained in:
Alex P 2025-10-23 11:47:30 +03:00
parent 1b007b76d7
commit 8c1ebe35fd
1 changed files with 3 additions and 0 deletions

View File

@ -179,6 +179,9 @@ func onRPCMessage(message webrtc.DataChannelMessage, session *Session) {
return return
} }
// Update last active timestamp for any valid RPC activity
sessionManager.UpdateLastActive(session.ID)
var request JSONRPCRequest var request JSONRPCRequest
err := json.Unmarshal(message.Data, &request) err := json.Unmarshal(message.Data, &request)
if err != nil { if err != nil {