mirror of https://github.com/jetkvm/kvm.git
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:
parent
1b007b76d7
commit
8c1ebe35fd
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue