Exit rdesktop if error info is set
This fixes a problem where a connect loop is triggered when a user is closing the session and there is a pending resize triggered. When server sends error info PDU, this means that the client should close and not enter a reconnect due to pending resize or other reason such as network error or redirect... Co-authored-by: Henrik Andersson <hean01@cendio.com> Co-authored-by: Karl Mikaelsson <derfian@cendio.se> Co-authored-by: Thomas Nilefalk <thomas@nilefalk.se>
This commit is contained in:
parent
a0af72a337
commit
62ea190c0c
13
rdesktop.c
13
rdesktop.c
@ -1395,6 +1395,7 @@ main(int argc, char *argv[])
|
||||
|
||||
deactivated = False;
|
||||
g_reconnect_loop = False;
|
||||
ext_disc_reason = 0;
|
||||
rdp_main_loop(&deactivated, &ext_disc_reason);
|
||||
|
||||
tcp_run_ui(False);
|
||||
@ -1402,6 +1403,16 @@ main(int argc, char *argv[])
|
||||
logger(Core, Verbose, "Disconnecting...");
|
||||
rdp_disconnect();
|
||||
|
||||
/* If error info is set we do want to exit rdesktop
|
||||
connect loop. We do this by clearing flags that
|
||||
triggers a reconnect that could be set elsewere */
|
||||
if (ext_disc_reason != 0)
|
||||
{
|
||||
g_redirect = False;
|
||||
g_network_error = False;
|
||||
g_pending_resize = False;
|
||||
}
|
||||
|
||||
if (g_redirect)
|
||||
continue;
|
||||
|
||||
@ -1428,6 +1439,8 @@ main(int argc, char *argv[])
|
||||
g_reconnect_loop = True;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* exit main reconnect loop */
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user