Commit 8b4047d6 authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Only test remaining uncached bridge lines

This fixes a bug that occurs in requests that have both cached and
uncached bridge lines. In this case, we would serve the cached results
but then pass the unmodified TestRequest to Tor with both cached and
uncached bridges.
parent 7c4b4aad
......@@ -113,11 +113,12 @@ func testBridgeLines(req *TestRequest) *TestResult {
remainingBridgeLines = append(remainingBridgeLines, bridgeLine)
req.BridgeLines = remainingBridgeLines
// Test whatever bridges remain.
if len(remainingBridgeLines) > 0 {
if len(req.BridgeLines) > 0 {
log.Printf("%d bridge lines served from cache; testing remaining %d bridge lines.",
numCached, len(remainingBridgeLines))
numCached, len(req.BridgeLines))
start := time.Now()
req.resultChan = make(chan *TestResult)
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