From 4cdb7e9f444bb1ceed533e116fc8a6d1e67aadd4 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 1 Dec 2015 00:08:14 -0500 Subject: [PATCH] Add new Consul API client MonitorRetries option --- physical/consul.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/physical/consul.go b/physical/consul.go index e2305da3bd..abf0a40b90 100644 --- a/physical/consul.go +++ b/physical/consul.go @@ -206,9 +206,10 @@ func (c *ConsulBackend) List(prefix string) ([]string, error) { func (c *ConsulBackend) LockWith(key, value string) (Lock, error) { // Create the lock opts := &api.LockOptions{ - Key: c.path + key, - Value: []byte(value), - SessionName: "Vault Lock", + Key: c.path + key, + Value: []byte(value), + SessionName: "Vault Lock", + MonitorRetries: 5, } lock, err := c.client.LockOpts(opts) if err != nil {