--- a/src/server/daemon/sessionhandler.c Fri Dec 30 14:15:52 2016 +0100 +++ b/src/server/daemon/sessionhandler.c Fri Dec 30 18:47:26 2016 +0100 @@ -61,13 +61,6 @@ int ret = SSL_read(conn->ssl, buf, len); if(ret <= 0) { conn->ssl_error = SSL_get_error(conn->ssl, ret); - if(conn->ssl_error == SSL_ERROR_SYSCALL) { - log_ereport( - LOG_VERBOSE, - "Connection: %d: SSL_read failed: %s", - (int)conn, - strerror(errno)); - } } return ret; } @@ -76,22 +69,17 @@ int ret = SSL_write(conn->ssl, buf, len); if(ret <= 0) { conn->ssl_error = SSL_get_error(conn->ssl, ret); - if(conn->ssl_error == SSL_ERROR_SYSCALL) { - log_ereport( - LOG_VERBOSE, - "Connection: %d: SSL_write failed: %s", - (int)conn, - strerror(errno)); - } } return ret; } void connection_ssl_close(Connection *conn) { - int ret = SSL_shutdown(conn->ssl); - if(ret != 1) { - conn->ssl_error = SSL_get_error(conn->ssl, ret); - log_ereport(LOG_VERBOSE, "SSL_shutdown failed: %d", conn->ssl_error); + if(!conn->ssl_error) { + int ret = SSL_shutdown(conn->ssl); + if(ret != 1) { + conn->ssl_error = SSL_get_error(conn->ssl, ret); + log_ereport(LOG_VERBOSE, "SSL_shutdown failed: %d", conn->ssl_error); + } } close(conn->fd); }