Forum Discussion

AaronM00's avatar
AaronM00
Copper Contributor
Jun 16, 2025

RDS HTML5 WebClient - WebSocket issues on reconnection

Hi Everyone - Currently have an RD farm deployed to roughly 1000 users utilising azure app proxy and RD Web HTML5 client. This seems to work ok besides some issues with random disconnections.

 

This wouldn't be much of an issue if a user was disconnected and it reconnected, but I am experiencing an issue and this has been an issue since rollout. The webclient will attempt to reconnect 10 times and fail, the user then has to click the reconnect button for their session to come back.

 

The error in the troubleshooting logs provided by the user show:

 

2025-06-16T18:32:25.631Z Connection(ERR): The connection generated an internal exception with disconnect code=ConnectionBroken(8), extended code=<null>, reason=WebSocket closed with code: 1006 reason: 
 Thrown in thread 1440032 at:
    websockettransport.cpp(335)
Call Stack:
        at invoke_iiiiii
        at https://redacted/RDWeb/WebClient/static/librdp/librdphtml.5e634d6d7f9728ab68c3.wasm:wasm-function[11989]:0x3cf63f
        at invoke_vii
        at https://redacted/RDWeb/WebClient/static/librdp/librdphtml.5e634d6d7f9728ab68c3.wasm:wasm-function[1067]:0x4fede

Any help would be amazing, I'm at a dead end with this.

1 Reply

  • Take this:

     

    1. WebSocket Support in Azure App Proxy
      • Confirm that WebSocket support is fully enabled in your Azure App Proxy configuration. Even if it appears to work intermittently, inconsistent behavior can stem from proxy timeouts or dropped upgrade headers.
    2. Idle Timeout Settings
      • Check the App Proxy connector idle timeout and RD Gateway timeout policies. If the WebSocket is idle too long, it may be dropped silently.
    3. Reverse Proxy or Firewall Interference
      • If you're using a reverse proxy (e.g., NGINX, NetScaler), ensure it’s configured to allow WebSocket traffic (Upgrade and Connection headers must be preserved).
      • Some users resolved similar issues by adjusting Content-Security-Policy headers and allowing blob: and data: sources.
    4. Client-Side Network Conditions
      • Random disconnects can also be caused by unstable client networks (e.g., Wi-Fi drops, VPN latency). Consider enabling diagnostic logging on the client side to correlate disconnects with network events.
    5. WebClient Version & Updates
      • Make sure you're using the latest version of the HTML5 WebClient. Microsoft occasionally releases fixes that improve reconnection logic and WebSocket resilience.
    6. Fallback Strategy
      • If reconnection fails after 10 attempts, consider scripting a client-side refresh or auto-click of the reconnect button as a temporary workaround.

Resources