aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-01-31 21:54:04 +0100
committerSebastian Hahn <sebastian@torproject.org>2010-02-08 16:45:36 +0100
commitb2b99a70c005ae4158786d0c30b35dc6db45e9b6 (patch)
tree65f159a50d1e4187f19a60fd48fc7b160c81b754 /src/or/connection.c
parent080e8f50f87fb7c0c099b1341173fa05c82a42e8 (diff)
downloadtor-b2b99a70c005ae4158786d0c30b35dc6db45e9b6.tar
tor-b2b99a70c005ae4158786d0c30b35dc6db45e9b6.tar.gz
Don't spam controllers with TOO_MANY_CONNECTIONS events
We implemented ratelimiting for warnings going into the logfile, but didn't rate-limit controller events. Now both log warnings and controller events are rate-limited.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index eeb25c182..cf1334574 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -822,9 +822,9 @@ warn_too_many_conns(void)
log_warn(LD_NET,"Failing because we have %d connections already. Please "
"raise your ulimit -n.", n_conns);
last_warned = now;
+ control_event_general_status(LOG_WARN, "TOO_MANY_CONNECTIONS CURRENT=%d",
+ n_conns);
}
- control_event_general_status(LOG_WARN, "TOO_MANY_CONNECTIONS CURRENT=%d",
- n_conns);
}
/** Bind a new non-blocking socket listening to the socket described