Browse Source

[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)
master
Glenn Strauss 2 months ago
parent
commit
471ab4dd5b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/connections.c

+ 1
- 1
src/connections.c View File

@ -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;


Loading…
Cancel
Save