Skip to content

Commit

Permalink
Don't restart if consent wasn't granted on the first request.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Aug 22, 2023
1 parent 03486df commit 3440bbe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Server/Services/RcImplementations/HubEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ public Task NotifySessionChanged(RemoteControlSession session, SessionSwitchReas
return Task.CompletedTask;
}

if (ex.RequireConsent)
{
// Don't restart if consent wasn't granted on the first request.
return Task.CompletedTask;
}

_logger.LogDebug("Windows session changed during remote control. " +
"Reason: {reason}. " +
"Current Session ID: {sessionId}. " +
Expand Down Expand Up @@ -126,6 +132,12 @@ public Task RestartScreenCaster(RemoteControlSession session, HashSet<string> vi
return Task.CompletedTask;
}

if (ex.RequireConsent)
{
// Don't restart if consent wasn't granted on the first request.
return Task.CompletedTask;
}

return _serviceHub.Clients
.Client(ex.AgentConnectionId)
.RestartScreenCaster(
Expand Down
2 changes: 1 addition & 1 deletion submodules/Immense.RemoteControl

0 comments on commit 3440bbe

Please sign in to comment.