aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-10-31 14:10:23 -0400
committerNick Mathewson <nickm@torproject.org>2013-10-31 14:29:18 -0400
commit8f793c38fbcd885d40adf8312ef1767e172e1be4 (patch)
tree0bdd3942771b1372293602adba81c2417d2a06e1 /src/or/connection.c
parent96f92f2062118b61a43134170b92001d3be1c128 (diff)
downloadtor-8f793c38fbcd885d40adf8312ef1767e172e1be4.tar
tor-8f793c38fbcd885d40adf8312ef1767e172e1be4.tar.gz
Move other #9731 check to start of its functions
At arma's suggestion. Looks like I missed this one.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 210c6582b..1f6e11fac 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2711,6 +2711,9 @@ connection_consider_empty_write_buckets(connection_t *conn)
{
const char *reason;
+ if (!connection_is_rate_limited(conn))
+ return; /* Always okay. */
+
if (global_write_bucket <= 0) {
reason = "global write bucket exhausted. Pausing.";
} else if (connection_counts_as_relayed_traffic(conn, approx_time()) &&
@@ -2723,9 +2726,6 @@ 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);