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 de37476a9..c76b3c9bd 100644 --- a/weed/cluster/lock_client.go +++ b/weed/cluster/lock_client.go @@ -3,6 +3,7 @@ package cluster import ( "context" "fmt" + "github.com/seaweedfs/seaweedfs/weed/cluster/lock_manager" "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/pb" "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" @@ -42,7 +43,7 @@ func (lc *LockClient) NewLockWithTimeout(filer pb.ServerAddress, key string, loc // NewLock creates a lock with a very long duration func (lc *LockClient) NewLock(filer pb.ServerAddress, key string) (lock *LiveLock) { - return lc.doNewLock(filer, key, time.Duration(1<<63-1)) + return lc.doNewLock(filer, key, lock_manager.MaxDuration) } func (lc *LockClient) doNewLock(filer pb.ServerAddress, key string, lockDuration time.Duration) (lock *LiveLock) { |
