1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-01 16:59:08 -04:00

close timer faster

This commit is contained in:
Darien Raymond
2017-05-09 00:01:15 +02:00
parent aea71c2aa8
commit 5829b45bbe
12 changed files with 96 additions and 90 deletions

View File

@@ -35,7 +35,7 @@ func (r *retryer) On(method func() error) error {
accumulatedError = append(accumulatedError, err)
}
delay := r.nextDelay()
<-time.After(time.Duration(delay) * time.Millisecond)
time.Sleep(time.Duration(delay) * time.Millisecond)
attempt++
}
return newError(accumulatedError).Base(ErrRetryFailed)