diff --git a/common.h b/common.h index fd365e3..380264c 100644 --- a/common.h +++ b/common.h @@ -99,8 +99,10 @@ static int __attribute__((unused)) ssl_write_with_timeout(SSL *ssl, int fd, char switch (ssl_error) { case SSL_ERROR_WANT_READ: status = wait_rd_with_timeout(fd, timeout); - if (status == -1) + if (status == -1) { + COMMON_LOG(LOG_ERR, "%s: %m", __func__); return -1; + } continue; case SSL_ERROR_SYSCALL: COMMON_LOG(LOG_ERR, "%s: %m", __func__); @@ -127,8 +129,10 @@ static int __attribute__((unused)) ssl_read_with_timeout(SSL *ssl, int fd, void switch (ssl_error) { case SSL_ERROR_WANT_READ: status = wait_rd_with_timeout(fd, timeout); - if (status == -1) + if (status == -1) { + COMMON_LOG(LOG_ERR, "%s: %m", __func__); return -1; + } continue; case SSL_ERROR_SYSCALL: if (errno == 0) { @@ -158,8 +162,10 @@ static int __attribute__((unused)) ssl_accept_with_timeout(SSL *ssl, int fd, in switch (ssl_error) { case SSL_ERROR_WANT_READ: status = wait_rd_with_timeout(fd, timeout); - if (status == -1) + if (status == -1) { + COMMON_LOG(LOG_ERR, "%s: %m", __func__); return -1; + } continue; case SSL_ERROR_SYSCALL: if (errno == 0) {