Skip to content

fix(agent): allow DVC open retries to complete before negotiation times out - #1908

Open
Richard Markiewicz (thenextman) wants to merge 1 commit into
masterfrom
fix/dvc-negotiation-deadline
Open

fix(agent): allow DVC open retries to complete before negotiation times out#1908
Richard Markiewicz (thenextman) wants to merge 1 commit into
masterfrom
fix/dvc-negotiation-deadline

Conversation

@thenextman

Copy link
Copy Markdown
Member

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.

Copilot AI balanced review requested due to automatic review settings August 4, 2026 19:46
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +457 to +460
/// 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 =>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants