You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2018/01/22 20:30:12 UTC

[3/4] guacamole-server git commit: GUACAMOLE-484: Do not flush frame if connection closed mid-frame.

GUACAMOLE-484: Do not flush frame if connection closed mid-frame.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/822a6c6b
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/822a6c6b
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/822a6c6b

Branch: refs/heads/master
Commit: 822a6c6b9dcc278c55ac3dd13c13c78ff1402acc
Parents: 61c16a8
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Jan 22 12:24:07 2018 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon Jan 22 12:24:07 2018 -0800

----------------------------------------------------------------------
 src/protocols/rdp/rdp.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/822a6c6b/src/protocols/rdp/rdp.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp.c b/src/protocols/rdp/rdp.c
index 0909d9c..f21e30c 100644
--- a/src/protocols/rdp/rdp.c
+++ b/src/protocols/rdp/rdp.c
@@ -841,10 +841,12 @@ static int guac_rdp_handle_connection(guac_client* client) {
             guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_UNAVAILABLE,
                     "Connection closed.");
 
-        /* Flush frame */
-        guac_common_display_flush(rdp_client->display);
-        guac_client_end_frame(client);
-        guac_socket_flush(client->socket);
+        /* Flush frame only if successful */
+        else {
+            guac_common_display_flush(rdp_client->display);
+            guac_client_end_frame(client);
+            guac_socket_flush(client->socket);
+        }
 
     }