aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-10-31 14:09:18 -0400
committerNick Mathewson <nickm@torproject.org>2013-10-31 14:09:18 -0400
commit702c0502cf3121e2e698963cf53adb00ae2d136d (patch)
tree74f650cab5dc988b44f2ac51289d7b5b24f45e70
parent8676a08362a192f17f2850359b16933c2a5786dd (diff)
parent9205552daab22aaa5178f2abbe169bb79f0cf8e3 (diff)
downloadtor-702c0502cf3121e2e698963cf53adb00ae2d136d.tar
tor-702c0502cf3121e2e698963cf53adb00ae2d136d.tar.gz
Merge remote-tracking branch 'public/bug9731'
-rw-r--r--changes/bug97313
-rw-r--r--src/or/connection.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/changes/bug9731 b/changes/bug9731
new file mode 100644
index 000000000..11bbc6ab6
--- /dev/null
+++ b/changes/bug9731
@@ -0,0 +1,3 @@
+ o Major bugfixes:
+ - Do not apply connection_consider_empty_read/write_buckets to
+ non-rate-limited connections.
diff --git a/src/or/connection.c b/src/or/connection.c
index 96d1c482a..43ec43f43 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2696,6 +2696,9 @@ connection_consider_empty_read_buckets(connection_t *conn)
} else
return; /* all good, no need to stop it */
+ if (!connection_is_rate_limited(conn))
+ return; /* Always okay. */
+
LOG_FN_CONN(conn, (LOG_DEBUG, LD_NET, "%s", reason));
conn->read_blocked_on_bw = 1;
connection_stop_reading(conn);
@@ -2720,6 +2723,9 @@ connection_consider_empty_write_buckets(connection_t *conn)
} else
return; /* all good, no need to stop it */
+ if (!connection_is_rate_limited(conn))
+ return; /* Always okay. */
+
LOG_FN_CONN(conn, (LOG_DEBUG, LD_NET, "%s", reason));
conn->write_blocked_on_bw = 1;
connection_stop_writing(conn);