From 165d2487bbce1620284352fcd3c831a7e3494f2a Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 10 Sep 2015 22:54:14 +0100 Subject: [PATCH] Change openssl connect err check for < 0 instead of == -1 --- src/tls_openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tls_openssl.c b/src/tls_openssl.c index 3ad374f..6d2a557 100644 --- a/src/tls_openssl.c +++ b/src/tls_openssl.c @@ -100,11 +100,11 @@ int tls_start(tls_t *tls) /* Since we're non-blocking, loop the connect call until it succeeds or fails */ - while (ret == -1) { + while (ret < 0) { ret = SSL_connect(tls->ssl); /* wait for something to happen on the sock before looping back */ - if (ret == -1) { + if (ret < 0) { fd_set fds; struct timeval tv;