1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-12 00:35:27 -04:00

refactor error interface

This commit is contained in:
Darien Raymond
2017-04-06 15:13:09 +02:00
parent 65c6972eb5
commit fc31f9b94c
40 changed files with 272 additions and 249 deletions

View File

@@ -38,7 +38,7 @@ func (r *retryer) On(method func() error) error {
<-time.After(time.Duration(delay) * time.Millisecond)
attempt++
}
return errors.Base(ErrRetryFailed).Message(accumulatedError)
return errors.New(accumulatedError).Base(ErrRetryFailed)
}
// Timed returns a retry strategy with fixed interval.