diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index c609afe27..5aefdb936 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -874,7 +874,7 @@ int transport_check_fds(rdpTransport* transport) { status = transport_read_nonblocking(transport); - if (status <= 0) + if (status < 0 || Stream_GetPosition(transport->ReceiveBuffer) == 0) return status; while ((pos = Stream_GetPosition(transport->ReceiveBuffer)) > 0)