From 4eb09bd8317583f21aad9532efcbe13ab22278dc Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Fri, 17 Aug 2018 16:06:47 -0400 Subject: [PATCH] Use strings.Contains for error possibly coming from storage They may not well errwrap Fixes #5046 --- vault/expiration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vault/expiration.go b/vault/expiration.go index f57904f239bf..79bf341f218d 100644 --- a/vault/expiration.go +++ b/vault/expiration.go @@ -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