Skip to content

Commit

Permalink
Use strings.Contains for error possibly coming from storage
Browse files Browse the repository at this point in the history
They may not well errwrap

Fixes #5046
  • Loading branch information
jefferai committed Aug 17, 2018
1 parent f7f98e2 commit 4eb09bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vault/expiration.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (m *ExpirationManager) Restore(errorFunc func()) (retErr error) {

switch {
case retErr == nil:
case errwrap.Contains(retErr, context.Canceled.Error()):
case strings.Contains(retErr.Error(), context.Canceled.Error()):
// Don't run error func because we lost leadership
m.logger.Warn("context cancled while restoring leases, stopping lease loading")
retErr = nil
Expand Down

0 comments on commit 4eb09bd

Please sign in to comment.