mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-12 00:13:45 +02:00
Use strings.Contains for error possibly coming from storage
They may not well errwrap Fixes #5046
This commit is contained in:
parent
f7f98e222a
commit
4eb09bd831
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user