diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index bb455a927..ffedf1b63 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -711,7 +711,7 @@ int transport_read_layer(rdpTransport* transport, BYTE* data, int bytes) if (status < 0) { - if (!BIO_should_retry(transport->frontBio)) + if (!transport->frontBio || !BIO_should_retry(transport->frontBio)) { /* something unexpected happened, let's close */ transport->layer = TRANSPORT_LAYER_CLOSED;