diff options
Diffstat (limited to 'weed/cluster/lock_client.go')
| -rw-r--r-- | weed/cluster/lock_client.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/cluster/lock_client.go b/weed/cluster/lock_client.go index c21f20874..e222807e6 100644 --- a/weed/cluster/lock_client.go +++ b/weed/cluster/lock_client.go @@ -73,6 +73,7 @@ func (lc *LockClient) StartLock(key string, owner string) (lock *LiveLock) { return nil }, func(err error) (shouldContinue bool) { if err != nil { + glog.Warningf("create lock %s: %s", key, err) time.Sleep(time.Second) } return lock.renewToken == "" @@ -124,7 +125,7 @@ func (lc *LockClient) doNewLock(key string, lockDuration time.Duration, owner st } func (lock *LiveLock) IsLocked() bool { - return lock.isLocked + return lock!=nil && lock.isLocked } func (lock *LiveLock) StopLock() error { |
