mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-28 04:10:44 -04:00
Rename error return var
This commit is contained in:
parent
e92001ca69
commit
82a04398a3
1 changed files with 2 additions and 2 deletions
|
|
@ -351,7 +351,7 @@ func (c *EtcdLock) watchForKeyRemoval(key string, etcdIndex uint64, closeCh chan
|
|||
//
|
||||
// If the lock is currently held by this instance of EtcdLock, Lock will
|
||||
// return an EtcdLockHeldError error.
|
||||
func (c *EtcdLock) Lock(stopCh <-chan struct{}) (doneCh <-chan struct{}, err error) {
|
||||
func (c *EtcdLock) Lock(stopCh <-chan struct{}) (doneCh <-chan struct{}, retErr error) {
|
||||
// Get the local lock before interacting with etcd.
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
|
@ -385,7 +385,7 @@ func (c *EtcdLock) Lock(stopCh <-chan struct{}) (doneCh <-chan struct{}, err err
|
|||
// Create a channel to signal when we lose the semaphore key.
|
||||
done := make(chan struct{})
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if retErr != nil {
|
||||
close(done)
|
||||
}
|
||||
}()
|
||||
|
|
|
|||
Loading…
Reference in a new issue