diff options
author | Yann Ylavic <ylavic@apache.org> | 2015-02-05 18:36:23 +0100 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2015-02-05 18:36:23 +0100 |
commit | c6f5f2f63f7319f5f04a749c7d9af6be9cf4e0c0 (patch) | |
tree | a2f2d3454c8579aade37e441267b1bb45abc5b57 /modules/proxy/mod_proxy_wstunnel.c | |
parent | Fix typo spotted by micha137 in online doc (diff) | |
download | apache2-c6f5f2f63f7319f5f04a749c7d9af6be9cf4e0c0.tar.xz apache2-c6f5f2f63f7319f5f04a749c7d9af6be9cf4e0c0.zip |
mod_proxy_connect/wstunnel: If both client and backend sides get readable
at the same time, don't lose errors occuring while forwarding on the first
side when none occurs next on the other side, and abort.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657636 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/proxy/mod_proxy_wstunnel.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/proxy/mod_proxy_wstunnel.c b/modules/proxy/mod_proxy_wstunnel.c index 636c5074fc..cd8c6b670c 100644 --- a/modules/proxy/mod_proxy_wstunnel.c +++ b/modules/proxy/mod_proxy_wstunnel.c @@ -55,8 +55,8 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_as apr_bucket_brigade *bb = baton->bb; while(1) { - if ((rv = apr_pollset_poll(pollset, timeout, &pollcnt, &signalled)) - != APR_SUCCESS) { + rv = apr_pollset_poll(pollset, timeout, &pollcnt, &signalled); + if (rv != APR_SUCCESS) { if (APR_STATUS_IS_EINTR(rv)) { continue; } @@ -86,16 +86,16 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_as if (pollevent & (APR_POLLIN | APR_POLLHUP)) { ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02446) "sock was readable"); - rv = proxy_wstunnel_transfer(r, backconn, c, bb, "sock"); + rv |= proxy_wstunnel_transfer(r, backconn, c, bb, "sock"); } else if (pollevent & APR_POLLERR) { - rv = APR_EPIPE; + rv |= APR_EPIPE; backconn->aborted = 1; ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02447) "error on backconn"); } else { - rv = APR_EGENERAL; + rv |= APR_EGENERAL; ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02605) "unknown event on backconn %d", pollevent); } @@ -105,22 +105,22 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_as if (pollevent & (APR_POLLIN | APR_POLLHUP)) { ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02448) "client was readable"); - rv = proxy_wstunnel_transfer(r, c, backconn, bb, "client"); + rv |= proxy_wstunnel_transfer(r, c, backconn, bb, "client"); } else if (pollevent & APR_POLLERR) { - rv = APR_EPIPE; + rv |= APR_EPIPE; c->aborted = 1; ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02607) "error on client conn"); } else { - rv = APR_EGENERAL; + rv |= APR_EGENERAL; ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02606) "unknown event on client conn %d", pollevent); } } else { - rv = APR_EBADF; + rv |= APR_EBADF; ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02449) "unknown socket in pollset"); } |