Commit 07f1bc6d authored by Matt Traudt's avatar Matt Traudt
Browse files

Reduce freshness a little extra in ResultErrorCircuit

There are times when a failure to build a circuit through a relay is
not the relay's fault. See the comment added in this commit for more
parent 9872a81a
......@@ -283,6 +283,21 @@ class ResultErrorCircuit(ResultError):
def type(self):
return _ResultType.ErrorCircuit
def freshness_reduction_factor(self):
There are a few instances when it isn't the relay's fault that the
circuit failed to get built. Maybe someday we'll try detecting whose
fault it most likely was and subclassing ResultErrorCircuit. But for
now we don't. So reduce the freshness slightly more than ResultError
does by default so priority isn't hurt quite as much.
A (hopefully very very rare) example of when a circuit would fail to
get built is when the sbws client machine suddenly loses Internet
return 0.6
def from_dict(d):
assert isinstance(d, dict)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment