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:11 UTC

[2/4] guacamole-server git commit: GUACAMOLE-484: Always clean up after orderly disconnect.

GUACAMOLE-484: Always clean up after orderly disconnect.


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

Branch: refs/heads/master
Commit: 61c16a89d2def4457ba5198d599c0c2218ee35ec
Parents: d562cb7
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Jan 22 12:23:39 2018 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon Jan 22 12:23:39 2018 -0800

----------------------------------------------------------------------
 src/protocols/rdp/rdp.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/61c16a89/src/protocols/rdp/rdp.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/rdp.c b/src/protocols/rdp/rdp.c
index c8f7a85..0909d9c 100644
--- a/src/protocols/rdp/rdp.c
+++ b/src/protocols/rdp/rdp.c
@@ -833,13 +833,11 @@ static int guac_rdp_handle_connection(guac_client* client) {
         pthread_mutex_unlock(&(rdp_client->rdp_lock));
 
         /* Close connection cleanly if server is disconnecting */
-        if (connection_closing) {
+        if (connection_closing)
             guac_rdp_client_abort(client);
-            return 1;
-        }
 
-        /* If an error occurred, fail */
-        if (wait_result < 0)
+        /* If a low-level connection error occurred, fail */
+        else if (wait_result < 0)
             guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_UNAVAILABLE,
                     "Connection closed.");