From 697c0f190d2ca6a51350f3e8a1fdba4c260bee74 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Fri, 27 Sep 2013 08:18:34 +0000 Subject: [PATCH] Initialize deactivate variable and make sure we check it to control reconnection logic. When hitting cancel at the logon dialog, server will send a deactivate PDU and close the socket the hard way. This behaviour introduce a problem when using SSL connection were rdesktop detected a network error and entered reconnection loop. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1748 423420c4-83ab-492f-b58f-81f9feb106b5 --- rdesktop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rdesktop.c b/rdesktop.c index 9af46b5..386712b 100644 --- a/rdesktop.c +++ b/rdesktop.c @@ -1153,6 +1153,7 @@ main(int argc, char *argv[]) rd_create_ui(); tcp_run_ui(True); + deactivated = False; g_redirect = False; g_reconnect_loop = False; rdp_main_loop(&deactivated, &ext_disc_reason); @@ -1166,7 +1167,7 @@ main(int argc, char *argv[]) continue; /* handle network error and start autoreconnect */ - if (g_network_error) + if (g_network_error && !deactivated) { fprintf(stderr, "Disconnected due to network error, retrying to reconnect for %d minutes.\n",