diff --git a/libratbox/src/mbedtls.c b/libratbox/src/mbedtls.c index e059672f..71ae23b7 100644 --- a/libratbox/src/mbedtls.c +++ b/libratbox/src/mbedtls.c @@ -634,7 +634,7 @@ rb_ssl_read(rb_fde_t *const F, void *const buf, size_t count) ssize_t ret = (ssize_t) mbedtls_ssl_read(SSL_P(F), buf, count); - if(ret > 0) + if(ret >= 0) return ret; switch(ret) @@ -660,7 +660,7 @@ rb_ssl_write(rb_fde_t *const F, const void *const buf, size_t count) ssize_t ret = (ssize_t) mbedtls_ssl_write(SSL_P(F), buf, count); - if(ret > 0) + if(ret >= 0) return ret; switch(ret)