diff options
author | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-03-08 13:28:50 +0300 |
---|---|---|
committer | Antenore Gatta (tmow) <antenore@simbiosi.org> | 2022-03-08 13:29:40 +0300 |
commit | 1869d0680f4338899d5f9604e7c4a93c32a0fab5 (patch) | |
tree | f430877298a81d844a335ac912e550bf0a4716c9 /plugins | |
parent | cc604c974096bf24772c4857284087dd28e7ef94 (diff) |
Fix #2695 - reconnect attemps setting
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/rdp/rdp_plugin.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/rdp/rdp_plugin.c b/plugins/rdp/rdp_plugin.c index ea7779922..54b036e9a 100644 --- a/plugins/rdp/rdp_plugin.c +++ b/plugins/rdp/rdp_plugin.c @@ -400,12 +400,18 @@ BOOL rf_auto_reconnect(rfContext *rfi) rfi->is_reconnecting = TRUE; rfi->stop_reconnecting_requested = FALSE; + /* Get the value set in FreeRDP_AutoReconnectMaxRetries (20) */ maxattempts = FreeRDP_AutoReconnectMaxRetries; + /* Get the value from the global preferences if any */ if ((cval = remmina_plugin_service->pref_get_value("rdp_reconnect_attempts")) != NULL) maxattempts = atoi(cval); + /* Get the value from the profile if any, otherwise uses the value of maxattempts */ maxattempts = remmina_plugin_service->file_get_int(remminafile, "rdp_reconnect_attempts", maxattempts); - if (maxattempts <= 0) + /* If maxattemps is <= 0, we get the value from FreeRDP_AutoReconnectMaxRetries (20) */ + if (maxattempts < 0) maxattempts = freerdp_settings_get_uint32(settings, FreeRDP_AutoReconnectMaxRetries); + freerdp_settings_set_uint32(settings, FreeRDP_AutoReconnectMaxRetries, maxattempts); + rfi->reconnect_maxattempts = maxattempts; rfi->reconnect_nattempt = 0; @@ -440,7 +446,6 @@ BOOL rf_auto_reconnect(rfContext *rfi) * - processing of the UI event we just pushed on the queue * - better network conditions * Remember: We hare on a thread, so the main gui won’t lock */ - usleep(500000); /* Perform an auto-reconnect. */ |