summaryrefslogtreecommitdiffstats
path: root/server/mpm/simple/simple_io.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2017-09-22 10:07:47 +0200
committerYann Ylavic <ylavic@apache.org>2017-09-22 10:07:47 +0200
commit7bb1250a841884c1362480848724998b1009c55c (patch)
tree0242e85ae82b9f77ac0756db218acb57ad1a4dfe /server/mpm/simple/simple_io.c
parentevent: better apr_pollset_add() failure handling to avoid an (very unlikely) (diff)
downloadapache2-7bb1250a841884c1362480848724998b1009c55c.tar.xz
apache2-7bb1250a841884c1362480848724998b1009c55c.zip
event, simple, motorz: better naming, error code checking and arrangement
around pending output data handing; no functional change. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1809276 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--server/mpm/simple/simple_io.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/server/mpm/simple/simple_io.c b/server/mpm/simple/simple_io.c
index 3526eba10f..19f5af136b 100644
--- a/server/mpm/simple/simple_io.c
+++ b/server/mpm/simple/simple_io.c
@@ -93,15 +93,11 @@ static apr_status_t simple_io_process(simple_conn_t * scon)
}
if (scon->cs.state == CONN_STATE_WRITE_COMPLETION) {
- int not_complete_yet;
+ int pending;
ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, NULL);
- not_complete_yet = ap_run_output_pending(c);
-
- if (not_complete_yet > OK) {
- scon->cs.state = CONN_STATE_LINGER;
- }
- else if (not_complete_yet == OK) {
+ pending = ap_run_output_pending(c);
+ if (pending == OK) {
/* Still in WRITE_COMPLETION_STATE:
* Set a write timeout for this connection, and let the
* event thread poll for writeability.
@@ -130,7 +126,9 @@ static apr_status_t simple_io_process(simple_conn_t * scon)
}
return APR_SUCCESS;
}
- else if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted) {
+ if (pending != DECLINED
+ || c->keepalive != AP_CONN_KEEPALIVE
+ || c->aborted) {
scon->cs.state = CONN_STATE_LINGER;
}
else if (c->data_in_input_filters || ap_run_input_pending(c) == OK) {