Skip to content

Commit

Permalink
Ignore CircuitPriorityHalflife values under -EPSILON.
Browse files Browse the repository at this point in the history
Previously, we were ignoring values _over_ EPSILON.  This bug was
also causing a warning at startup because the default value is set
to -1.0.

Fixes bug 25577; bugfix on 6b1dba2.  Bug not in any released tor.
  • Loading branch information
nmathewson committed Apr 25, 2018
1 parent a052eea commit 2748dd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/or/circuitmux_ewma.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ get_circuit_priority_halflife(const or_options_t *options,
((double) CMUX_PRIORITY_HALFLIFE_MSEC_DEFAULT) / 1000.0;

/* Try to get it from configuration file first. */
if (options && options->CircuitPriorityHalflife < EPSILON) {
if (options && options->CircuitPriorityHalflife >= -EPSILON) {
halflife = options->CircuitPriorityHalflife;
*source_msg = "CircuitPriorityHalflife in configuration";
goto end;
Expand Down

0 comments on commit 2748dd0

Please sign in to comment.