From 4101af103eb8db2e6e53c8c964d86c21c45b8dc2 Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Wed, 3 Aug 2016 14:56:07 -0300 Subject: [PATCH] Return the number of data read and remove a useless line. --- src/ssl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 0ac1c56..84c609d 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -200,10 +200,9 @@ static int ssl_recv(void *ctx, char *data, size_t count, size_t *got, ssl->error = SSL_get_error(ssl->ssl, err); switch (ssl->error) { case SSL_ERROR_NONE: - *got = 0; + *got = err; return IO_DONE; case SSL_ERROR_ZERO_RETURN: - *got = 0; return IO_CLOSED; case SSL_ERROR_WANT_READ: err = socket_waitfd(&ssl->sock, WAITFD_R, tm);