mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix some issues in rate-limiting noticed by Sebastian
This commit is contained in:
+3
-1
@@ -288,7 +288,9 @@ command_process_create_cell(cell_t *cell, or_connection_t *conn)
|
||||
|
||||
/* hand it off to the cpuworkers, and then return. */
|
||||
if (assign_onionskin_to_cpuworker(NULL, circ, onionskin) < 0) {
|
||||
static ratelim_t handoff_warning = RATELIM_INIT(3600);
|
||||
#define WARN_HANDOFF_FAILURE_INTERVAL (6*60*60)
|
||||
static ratelim_t handoff_warning =
|
||||
RATELIM_INIT(WARN_HANDOFF_FAILURE_INTERVAL);
|
||||
char *m;
|
||||
if ((m = rate_limit_log(&handoff_warning, approx_time()))) {
|
||||
log_warn(LD_GENERAL,"Failed to hand off onionskin. Closing.%s",m);
|
||||
|
||||
Reference in New Issue
Block a user