Skip to content

Wait longer for RDP sessions after boot and refuse two running sessions with the same Windows user - #118

Open
mlopezsegura wants to merge 1 commit into
masterfrom
fix/rdp-boot-wait-same-user
Open

mlopezsegura wants to merge 1 commit into
masterfrom
fix/rdp-boot-wait-same-user

Conversation

@mlopezsegura

Copy link
Copy Markdown
Collaborator

Two problems from #80.

Autostart RDP sessions failed after a restart. Right after boot, signing in takes much longer. In the reporter's log, the RDP session (RDP-Tcp#0) appeared after 31 s but still had no user, and OpenStreamMS gave up after its 20 tries of 1.5 s. WaitForSession now waits by time: 30 s as before, or 2 minutes during the first 5 minutes after boot. The relaxed (any non-console session) half still starts halfway through.

Two sessions with the same Windows user shared one Windows session. Starting reuses the RDP session the user already has (GetOrCreateSession), so a second OpenStreamMS session with the same user attached to the first one's Windows session. Stopping either logged that session off and stopped both. Starting a session now fails while another running session uses the same Windows user, with a message (22 languages) that names it and suggests another user or an isolated session. Local sessions and isolated sessions with their own user aren't affected.

Tests: SessionStartGuardsTests (5 new), full suite (215) and i18n pass. Not tried on a real PC after a reboot.

🤖 Generated with Claude Code

…ssion

After a restart, an autostart RDP session took more than 30 s to sign in
(its RDP-Tcp session was there but still without a user) and was marked as
failed after 20 tries. The wait is now by time: 30 s, or 2 minutes during
the first 5 minutes after boot.

Two sessions with the same Windows user ended up in the same Windows
session, because starting reuses the RDP session the user already has;
stopping either closed both. Starting a session now fails with a clear
message while another running session uses the same Windows user.

Both from #80.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant