mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix bug 1042.
If your relay can't keep up with the number of incoming create cells, it would log one warning per failure into your logs. Limit warnings to 1 per minute.
This commit is contained in:
+11
-5
@@ -58,11 +58,17 @@ onion_pending_add(or_circuit_t *circ, char *onionskin)
|
||||
tor_assert(!ol_tail->next);
|
||||
|
||||
if (ol_length >= get_options()->MaxOnionsPending) {
|
||||
log_warn(LD_GENERAL,
|
||||
"Your computer is too slow to handle this many circuit "
|
||||
"creation requests! Please consider using the "
|
||||
"MaxAdvertisedBandwidth config option or choosing a more "
|
||||
"restricted exit policy.");
|
||||
#define WARN_TOO_MANY_CIRC_CREATIONS_INTERVAL (60)
|
||||
static time_t last_warned = 0;
|
||||
time_t now = time(NULL);
|
||||
if (last_warned + WARN_TOO_MANY_CIRC_CREATIONS_INTERVAL < now) {
|
||||
log_warn(LD_GENERAL,
|
||||
"Your computer is too slow to handle this many circuit "
|
||||
"creation requests! Please consider using the "
|
||||
"MaxAdvertisedBandwidth config option or choosing a more "
|
||||
"restricted exit policy.");
|
||||
last_warned = now;
|
||||
}
|
||||
tor_free(tmp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user