From 8662884447efc414e885b20b965f465d37a01fb5 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Tue, 13 Nov 2018 08:37:43 +0000 Subject: [PATCH] Fix: Corrected error handling for TLS connections See: #2355 --- src/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index df85b07d..d97844d7 100644 --- a/src/connection.c +++ b/src/connection.c @@ -253,7 +253,7 @@ static int connection_read_ssl (connection_t *con, void *buf, size_t len) { int bytes = SSL_read (con->ssl, buf, len); - if (bytes < 0) + if (bytes <= 0) { switch (SSL_get_error (con->ssl, bytes)) {