Browse Source

fixed server-based traffic shaping if connection limit is not set

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@879 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.8
Jan Kneschke 16 years ago
parent
commit
7d2a0ff6dc
  1. 3
      src/server.c

3
src/server.c

@ -974,7 +974,8 @@ int main (int argc, char **argv) {
if (0 == (t_diff = srv->cur_ts - con->connection_start)) t_diff = 1;
if (con->traffic_limit_reached &&
((con->bytes_written / t_diff) < con->conf.kbytes_per_second * 1024)) {
(con->conf.kbytes_per_second == 0 ||
((con->bytes_written / t_diff) < con->conf.kbytes_per_second * 1024))) {
/* enable connection again */
con->traffic_limit_reached = 0;

Loading…
Cancel
Save