From 6097857fc5e5564198981d94c284917d9b60eec4 Mon Sep 17 00:00:00 2001 From: Adrien Castex Date: Fri, 16 Jun 2017 09:26:48 +0200 Subject: [PATCH] Fixed a timeout error for the locks --- lib/resource/lock/Lock.js | 2 +- src/resource/lock/Lock.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/resource/lock/Lock.js b/lib/resource/lock/Lock.js index c54c6374..8a30b1d2 100644 --- a/lib/resource/lock/Lock.js +++ b/lib/resource/lock/Lock.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var Lock = (function () { function Lock(lockKind, user, owner) { - this.expirationDate = Date.now() + lockKind.timeout; + this.expirationDate = Date.now() + lockKind.timeout * 1000; this.lockKind = lockKind; this.owner = owner; this.uuid = Lock.generateUUID(this.expirationDate); diff --git a/src/resource/lock/Lock.ts b/src/resource/lock/Lock.ts index 21aa1879..5d734ba1 100644 --- a/src/resource/lock/Lock.ts +++ b/src/resource/lock/Lock.ts @@ -47,7 +47,7 @@ export class Lock constructor(lockKind : LockKind, user : IUser | string, owner : LockOwner) { - this.expirationDate = Date.now() + lockKind.timeout; + this.expirationDate = Date.now() + lockKind.timeout * 1000; this.lockKind = lockKind; this.owner = owner; this.uuid = Lock.generateUUID(this.expirationDate);