fix(client): send shutdown before resize-fallback reconnect - #1804
Open
Mariusz Białończyk (manio) wants to merge 2 commits into
Open
fix(client): send shutdown before resize-fallback reconnect#1804Mariusz Białończyk (manio) wants to merge 2 commits into
Mariusz Białończyk (manio) wants to merge 2 commits into
Conversation
DISPLAY_CONTROL_READY_TIMEOUT was 3s, too tight right after login: the server is still negotiating DVC channels (rdpdr, rdpei, geometry, displaycontrol) at that point and can miss the Deactivate-Reactivate window, causing spurious ReactivationTimedOut fallbacks. Raise it to 8s. The reconnect loop also fired a brand new NLA/CredSSP handshake immediately after a resize fallback, with zero delay. Landing right after a prior handshake in this same loop, some RDP hosts reject the follow-up logon with STATUS_LOGON_FAILURE even though the credentials are correct. Add a 2s cooldown before retrying, mirroring the delay already used by confirm_auto_reconnect for transport- failure retries.
Mariusz Białończyk (manio)
deployed
to
llm-providers
August 26, 2026 10:03 — with
GitHub Actions
Active
Mariusz Białończyk (manio)
deployed
to
llm-providers
August 28, 2026 03:08 — with
GitHub Actions
Active
A resize fallback abandons the current session by dropping the TCP connection, with no RDP-level signal that the session ended. If a fresh NLA/CredSSP logon for the same account arrives moments later, the server can still consider the old session live, stall for several seconds resolving the conflict, and then reject the new logon with STATUS_LOGON_FAILURE. Send a ShareDataPdu::ShutdownRequest (graceful_shutdown) before each of the four reconnect-with-new-size return paths. This is fire-and-forget with a 500ms write timeout; we don't wait for the server's ShutdownDenied PDU since the client is reconnecting either way.
Mariusz Białończyk (manio)
force-pushed
the
connection-fixes
branch
from
August 28, 2026 03:21
c96cb87 to
ee81937
Compare
Mariusz Białończyk (manio)
deployed
to
llm-providers
August 28, 2026 03:21 — with
GitHub Actions
Active
Contributor
Author
|
I also ran some additional tests in a completely different environment, and the results were actually as expected (although somewhat counterintuitive, which is a good thing). Increasing the timeout to 8 seconds makes the session appear around 5-6 seconds faster. p.s. Is this PR good to merge? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi
This is my series of commits that fixes the connection issues to the server. Unfortunately, one of my target hosts is not exactly a speed demon, and to make matters worse, my corporate setup adds full antivirus protection and other stuff on top of it. As a result, only maybe 2–3 out of 10 connection attempts would succeed.
You had to hit the timing just right because IronRDP’s initial sequence was quite aggressive (interestingly, FreeRDP didn’t have this issue).
These two commits improve the situation dramatically - now virtually all the connections I've tried work reliably.