You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by "xelan (via GitHub)" <gi...@apache.org> on 2026/08/24 13:53:26 UTC

[PR] GUACAMOLE-2323: Abort the connection when FreeRDP reports a connection error [guacamole-server]

xelan opened a new pull request, #709:
URL: https://github.com/apache/guacamole-server/pull/709

   Fixes https://issues.apache.org/jira/browse/GUACAMOLE-2323


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GUACAMOLE-2323: Abort the connection when FreeRDP reports a connection error [guacamole-server]

Posted by "necouchman (via GitHub)" <gi...@apache.org>.
necouchman commented on code in PR #709:
URL: https://github.com/apache/guacamole-server/pull/709#discussion_r3845794228


##########
src/protocols/rdp/rdp.c:
##########
@@ -883,8 +883,16 @@ static int guac_rdp_handle_connection(guac_client* client) {
         /* Wait for data and construct a reasonable frame */
 
         int wait_result = rdp_guac_client_wait_for_events(client, GUAC_RDP_MESSAGE_CHECK_INTERVAL);
-        if (wait_result < 0)
+
+        /* Abort if the wait failed or FreeRDP recorded a connection error, as
+         * is the case when an RDP server tears down the connection without
+         * first sending a Set Error Info PDU. Simply leaving the loop would
+         * return from this function with the guac_client still running, which
+         * guac_rdp_client_thread() takes as a request to reconnect. */
+        if (wait_result < 0) {
+            guac_rdp_client_abort(client, rdp_inst);
             break;
+        }

Review Comment:
   How is guacd to distinguish events which _should_ trigger a reconnection from the logout events which _should not_?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GUACAMOLE-2323: Abort the connection when FreeRDP reports a connection error [guacamole-server]

Posted by "xelan (via GitHub)" <gi...@apache.org>.
xelan commented on code in PR #709:
URL: https://github.com/apache/guacamole-server/pull/709#discussion_r3850254110


##########
src/protocols/rdp/rdp.c:
##########
@@ -883,8 +883,16 @@ static int guac_rdp_handle_connection(guac_client* client) {
         /* Wait for data and construct a reasonable frame */
 
         int wait_result = rdp_guac_client_wait_for_events(client, GUAC_RDP_MESSAGE_CHECK_INTERVAL);
-        if (wait_result < 0)
+
+        /* Abort if the wait failed or FreeRDP recorded a connection error, as
+         * is the case when an RDP server tears down the connection without
+         * first sending a Set Error Info PDU. Simply leaving the loop would
+         * return from this function with the guac_client still running, which
+         * guac_rdp_client_thread() takes as a request to reconnect. */
+        if (wait_result < 0) {
+            guac_rdp_client_abort(client, rdp_inst);
             break;
+        }

Review Comment:
   Thanks for your feedback @necouchman! I've added another commit which improves the detection logic. Now the guac_rdp_client_abort is only done if FreeRDP reports an appropriate info code. Tested with Windows XP SP3. What do you think about this approach?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org