diff --git a/plugins/corerouter/corerouter.c b/plugins/corerouter/corerouter.c index 2582c918..c31bcfa0 100644 --- a/plugins/corerouter/corerouter.c +++ b/plugins/corerouter/corerouter.c @@ -96,9 +96,8 @@ int uwsgi_cr_peer_del(struct corerouter_peer *peer) { if (peer->flush && !peer->is_flushing) { peer->is_flushing = 1; // on success, suspend the execution - if (peer->flush(peer) >= 0) return -1; - } - + if (peer->flush(peer) > 0) return -1; + } struct corerouter_peer *prev = peer->prev; struct corerouter_peer *next = peer->next; diff --git a/plugins/http/https.c b/plugins/http/https.c index dec3103c..4bb04c90 100644 --- a/plugins/http/https.c +++ b/plugins/http/https.c @@ -310,7 +310,8 @@ ssize_t hr_ssl_write(struct corerouter_peer *main_peer) { } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_cr_error(main_peer, "hr_ssl_write()"); + if (errno != 0) + uwsgi_cr_error(main_peer, "hr_ssl_write()"); } else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) { @@ -368,7 +369,8 @@ ssize_t hr_ssl_read(struct corerouter_peer *main_peer) { } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_cr_error(main_peer, "hr_ssl_read()"); + if (errno != 0) + uwsgi_cr_error(main_peer, "hr_ssl_read()"); } else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) { @@ -406,7 +408,8 @@ ssize_t hr_ssl_shutdown(struct corerouter_peer *peer) { } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_cr_error(peer, "hr_ssl_shutdown()"); + if (errno != 0) + uwsgi_cr_error(peer, "hr_ssl_shutdown()"); } else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) { diff --git a/plugins/sslrouter/sslrouter.c b/plugins/sslrouter/sslrouter.c index 8bfcfdb8..71a4ff23 100644 --- a/plugins/sslrouter/sslrouter.c +++ b/plugins/sslrouter/sslrouter.c @@ -250,7 +250,8 @@ static ssize_t sr_write(struct corerouter_peer *main_peer) { } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_cr_error(main_peer, "sr_write()"); + if (errno != 0) + uwsgi_cr_error(main_peer, "sr_write()"); } else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) { @@ -332,7 +333,8 @@ static ssize_t sr_read(struct corerouter_peer *main_peer) { } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_cr_error(main_peer, "sr_ssl_read()"); + if (errno != 0) + uwsgi_cr_error(main_peer, "sr_ssl_read()"); } else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) { diff --git a/proto/base.c b/proto/base.c index d48e7c9d..fec45cfc 100644 --- a/proto/base.c +++ b/proto/base.c @@ -287,7 +287,8 @@ retry: } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_error("uwsgi_proto_ssl_write()/SSL_write()"); + if (errno != 0) + uwsgi_error("uwsgi_proto_ssl_write()/SSL_write()"); } return -1; @@ -383,7 +384,8 @@ retry: } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_error("uwsgi_proto_ssl_read_body()/SSL_read()"); + if (errno != 0) + uwsgi_error("uwsgi_proto_ssl_read_body()/SSL_read()"); } return -1; diff --git a/proto/http.c b/proto/http.c index 9fe664bd..402ca830 100644 --- a/proto/http.c +++ b/proto/http.c @@ -829,7 +829,8 @@ retry: } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_error("uwsgi_proto_https_parser()/SSL_read()"); + if (errno != 0) + uwsgi_error("uwsgi_proto_https_parser()/SSL_read()"); } return -1; empty: diff --git a/proto/uwsgi.c b/proto/uwsgi.c index e07f7a09..feaa47c8 100644 --- a/proto/uwsgi.c +++ b/proto/uwsgi.c @@ -84,7 +84,8 @@ retry: } else if (err == SSL_ERROR_SYSCALL) { - uwsgi_error("uwsgi_proto_suwsgi_parser()/SSL_read()"); + if (errno != 0) + uwsgi_error("uwsgi_proto_suwsgi_parser()/SSL_read()"); } return -1;