pruner: fail on every error that is not net.OpError.Temporary()

This commit is contained in:
Christian Schwarz
2018-10-19 15:57:38 +02:00
parent 45373168ad
commit 359ab2ca0c
2 changed files with 7 additions and 10 deletions
+2 -5
View File
@@ -329,11 +329,8 @@ func (s snapshot) Replicated() bool { return s.replicated }
func (s snapshot) Date() time.Time { return s.date }
func shouldRetry(e error) bool {
switch e.(type) {
case nil:
return true
case net.Error:
return true
if neterr, ok := e.(net.Error); ok {
return neterr.Temporary()
}
return false
}