Skip to content

Commit 30c1b03

Browse files
committed
Reduce reranking proxies if request can be tried with the next one
Other goroutines still may trigger reranking.
1 parent 635e418 commit 30c1b03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dispatcher/dispatcher.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,9 @@ func (d *Dispatcher) ServeProxied(req protocol.Requester) (bool, error) {
359359
log.Printf("%v <= %v", logPre, err)
360360
if globalOnline && p != nil {
361361
pp.UpdateProxy(p, 3*pp.Timeout)
362-
pp.Sort()
362+
if restart {
363+
pp.Sort()
364+
}
363365
}
364366
}
365367
return restart, err

0 commit comments

Comments
 (0)