From 4e97edadec9b77b351d138300db160379f46377d Mon Sep 17 00:00:00 2001 From: rbarnett <43044166+r-barnett@users.noreply.github.com> Date: Wed, 12 Sep 2018 10:16:27 -0500 Subject: [PATCH] Set an error exit code for an unsuccessful reconnect --- client/X11/xf_client.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/X11/xf_client.c b/client/X11/xf_client.c index bb9b87be8..c362a9533 100644 --- a/client/X11/xf_client.c +++ b/client/X11/xf_client.c @@ -1589,6 +1589,13 @@ static DWORD WINAPI xf_client_thread(LPVOID param) { if (xf_auto_reconnect(instance)) continue; + else + { + // Indicate an unsuccessful connection attempt if reconnect + // did not succeed, but did not give some other reason. + if (freerdp_error_info(instance) == 0) + exit_code = XF_EXIT_CONN_FAILED; + } if (freerdp_get_last_error(context) == FREERDP_ERROR_SUCCESS) WLog_ERR(TAG, "Failed to check FreeRDP file descriptor");