From 2391a1528bd40419da17bb1a3b2b188744c3c527 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 8 Jan 2020 17:40:39 +0100 Subject: [PATCH] CONNECT_TRANSPORT_FAILED in transport_check_fds If TRANSPORT_LAYER_CLOSED was detected in transport_check_fds check if there is already a connection error set, otherwise set FREERDP_ERROR_CONNECT_TRANSPORT_FAILED to allow proper reconnect or abort handling. Signed-off-by: Armin Novak --- libfreerdp/core/transport.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index 439fbbfdb..db3a887e8 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -1009,6 +1009,8 @@ int transport_check_fds(rdpTransport* transport) if (transport->layer == TRANSPORT_LAYER_CLOSED) { WLog_Print(transport->log, WLOG_DEBUG, "transport_check_fds: transport layer closed"); + if (freerdp_get_last_error(transport->context) == FREERDP_ERROR_SUCCESS) + freerdp_set_last_error_log(transport->context, FREERDP_ERROR_CONNECT_TRANSPORT_FAILED); return -1; }