diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2021-01-19 11:58:53 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2021-01-19 12:02:12 -0500 |
commit | 471ab4dd5bbf752c24fdd11bfcaf163b4769cfce (patch) | |
tree | f5943452810cd3dabfb2e0abafd20fd062753f3c | |
parent | fcbfc083520fcb4fcda46cfc837d4ee5880f83d2 (diff) | |
download | lighttpd-git-471ab4dd5bbf752c24fdd11bfcaf163b4769cfce.tar.gz |
[core] fix 100% CPU spin if traffic limit hit
(thx Dirk) (reported on FreeBSD)
HTTP/1.1 requests might end up spinning if traffic limits are configured
(connection.kbytes-per-second)
(server.kbytes-per-second)
-rw-r--r-- | src/connections.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connections.c b/src/connections.c index a87b1bfc..c7716574 100644 --- a/src/connections.c +++ b/src/connections.c @@ -523,7 +523,7 @@ static int connection_handle_write_state(request_st * const r, connection * cons } } while (r->http_version <= HTTP_VERSION_1_1 && (!chunkqueue_is_empty(&r->write_queue) - ? con->is_writable > 0 + ? con->is_writable > 0 && 0 == con->traffic_limit_reached : r->resp_body_finished)); return CON_STATE_WRITE; |