mirror of
https://github.com/docker/docs.git
synced 2026-04-13 23:06:15 +07:00
Merge pull request #1251 from abronan/fix_etcd_lock_ttl
Fix etcd lock TTL refresh value in seconds
This commit is contained in:
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@@ -47,7 +47,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/docker/libkv",
|
||||
"Rev": "1d2361d74ecd9aa75b17992cf5c63d2c5ab717ab"
|
||||
"Rev": "975dbc9a3dc76a4b3ed1f60f73b9c0323b40336c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/gogo/protobuf/proto",
|
||||
|
||||
2
Godeps/_workspace/src/github.com/docker/libkv/store/consul/consul.go
generated
vendored
2
Godeps/_workspace/src/github.com/docker/libkv/store/consul/consul.go
generated
vendored
@@ -88,7 +88,7 @@ func (s *Consul) setTLS(tls *tls.Config) {
|
||||
s.config.Scheme = "https"
|
||||
}
|
||||
|
||||
// SetTimeout sets the timout for connecting to Consul
|
||||
// SetTimeout sets the timeout for connecting to Consul
|
||||
func (s *Consul) setTimeout(time time.Duration) {
|
||||
s.config.WaitTime = time
|
||||
}
|
||||
|
||||
2
Godeps/_workspace/src/github.com/docker/libkv/store/etcd/etcd.go
generated
vendored
2
Godeps/_workspace/src/github.com/docker/libkv/store/etcd/etcd.go
generated
vendored
@@ -495,7 +495,7 @@ func (l *etcdLock) Lock(stopChan chan struct{}) (<-chan struct{}, error) {
|
||||
func (l *etcdLock) holdLock(key string, lockHeld chan struct{}, stopLocking <-chan struct{}) {
|
||||
defer close(lockHeld)
|
||||
|
||||
update := time.NewTicker(time.Duration((l.ttl / 3) + 1))
|
||||
update := time.NewTicker(time.Duration(l.ttl) * time.Second / 3)
|
||||
defer update.Stop()
|
||||
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user