fserrors: don't panic on uncomparable errors

s3-about
Nick Craig-Wood 2019-02-26 15:26:12 +00:00
parent dca482e058
commit c5775cf73d
1 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ func Cause(cause error) (retriable bool, err error) {
// this case.
err = prev
}
if err == prev {
if reflect.DeepEqual(err, prev) {
// Unpack any struct or *struct with a field
// of name Err which satisfies the error
// interface. This includes *url.Error,
@ -215,7 +215,7 @@ func Cause(cause error) (retriable bool, err error) {
}
}
}
if err == prev {
if reflect.DeepEqual(err, prev) {
break
}
}