fix(agent): allow DVC open retries to complete before negotiation times out - #1908
fix(agent): allow DVC open retries to complete before negotiation times out#1908Richard Markiewicz (thenextman) wants to merge 1 commit into
Conversation
Let maintainers know that an action is required on their side
|
There was a problem hiding this comment.
Pull request overview
Updates DVC initialization so negotiation waits for channel-open retries and failures provide clearer diagnostics.
Changes:
- Starts the negotiation timeout after the DVC opens.
- Tracks retry progress and logs HRESULT codes and timing.
- Adds retry-budget assertions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
devolutions-session/src/dvc/task.rs |
Gates negotiation timeout on channel initialization. |
devolutions-session/src/dvc/io.rs |
Tracks initialization progress and expands diagnostics/tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// The whole ladder has to fit in the window before negotiation starts, otherwise the last | ||
| /// attempts are unreachable. | ||
| #[test] | ||
| fn dvc_retry_ladder_is_fully_reachable() { |
| } | ||
| } | ||
| _timeout = tokio::time::sleep(HANDSHAKE_TIMEOUT) => | ||
| () = negotiation_deadline => |
When an RDP client is slow to accept the Devolutions Agent's virtual channel; for example when a third-party multi-factor authentication provider delays sign-in, or when reconnecting to an existing session; the agent could give up on the session before the connection had a chance to establish. The in-session agent then stayed unavailable for the rest of that RDP session, and features that depend on it, such as jumping through a host from Remote Desktop Manager, reported the agent as missing.
The agent now gives the channel its full retry budget instead of abandoning it partway through, so these connections succeed where they previously did not.
When the channel genuinely cannot be established, the agent now reports it as an error rather than shutting down as though nothing were wrong, and the logs identify which stage failed. Virtual channel failures are also logged with their numeric error code and timing, so a support log makes the cause clear regardless of the system's display language.