Fix some issues in rate-limiting noticed by Sebastian

This commit is contained in:
Nick Mathewson
2010-08-31 12:52:11 -04:00
parent ba9c1275c4
commit 285addbd94
3 changed files with 5 additions and 4 deletions
+3 -1
View File
@@ -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);