summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-09-26 15:31:21 +0000
committerNick Mathewson <nickm@torproject.org>2008-09-26 15:31:21 +0000
commitefea050fff83629dfcb9912ad293b0849dc6b30f (patch)
tree619f0152fead953ccf8fdf2dc3f2234f9bf42dc3
parent386b7d594b19e7f498fb9fa35b1a62c612488880 (diff)
downloadtor-efea050fff83629dfcb9912ad293b0849dc6b30f.tar.gz
tor-efea050fff83629dfcb9912ad293b0849dc6b30f.zip
Backport to 0.2.0.x: Apply rovv's fix for bug 824.
svn:r16976
-rw-r--r--ChangeLog5
-rw-r--r--src/or/connection.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d8edd1bb5..ba336154ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,11 @@ Changes in version 0.2.0.32 - 2008-??-??
port 80, we would previously reject the connection. Now, we assume
the user knows what they were asking for. Fixes bug 752. Bugfix
on 0.0.9rc5. Diagnosed by BarkerJr.
+ - If we overrun our per-second write limits a little, count this as
+ having used up our write allocation for the second, and choke outgoing
+ directory writes. Previously, we had only counted this when we
+ had met our limits precisely. Fixes bug 824. Patch from by rovv.
+ Bugfix on 0.2.0.x (??).
Changes in version 0.2.0.31 - 2008-09-03
diff --git a/src/or/connection.c b/src/or/connection.c
index 8c7b6a5dd8..630ef6f8b8 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1718,7 +1718,7 @@ connection_bucket_refill(int seconds_elapsed, time_t now)
tor_assert(seconds_elapsed >= 0);
write_buckets_empty_last_second =
- global_relayed_write_bucket == 0 || global_write_bucket == 0;
+ global_relayed_write_bucket <= 0 || global_write_bucket <= 0;
/* refill the global buckets */
connection_bucket_refill_helper(&global_read_bucket,