summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-11-23 11:44:35 +0000
committerJan Kneschke <jan@kneschke.de>2005-11-23 11:44:35 +0000
commitc33fc10a931378b67e3a4bbcebf7866777ca16a7 (patch)
tree273305523a38dee9c191d9f7f01250da9ebd6c09
parent96ae6c33150571ff4488b11f19eb697d8597e365 (diff)
downloadlighttpd1.4-lighttpd-1.4.8.tar.gz
lighttpd1.4-lighttpd-1.4.8.zip
fixed server-based traffic shaping if connection limit is not setlighttpd-1.4.8
git-svn-id: svn+ssh://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@879 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--src/server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server.c b/src/server.c
index b9f8f509..5c515e3c 100644
--- a/src/server.c
+++ b/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;