Merge pull request #4852 from r-barnett/fix-net-disconnect-exit-code

Set an error exit code for an unsuccessful reconnect
This commit is contained in:
akallabeth 2018-09-13 09:57:16 +02:00 committed by GitHub
commit 56d001ef1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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");