Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions essentials/node_modules/ewdMonitor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 7 additions & 11 deletions lib/ewdChildProcess.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ var EWD = {
token = null;
sessid = null;
if (expiry === '') return true;
var now = Math.floor(new Date().getTime()/1000);
var now = Math.floor(new Date().getTime()/1000) + 4070908800;
//if (expiry > this.hSeconds()) return false;
if (expiry > now) return false;
return true;
Expand All @@ -119,7 +119,7 @@ var EWD = {
database.kill(node);

var token = EWD.createToken();
var now = Math.floor(new Date().getTime()/1000);
var now = Math.floor(new Date().getTime()/1000) + 4070908800;
//var now = EWD.hSeconds();
if (!timeout) timeout = 3600;
var expiry = now + timeout;
Expand All @@ -141,9 +141,7 @@ var EWD = {
content: {
sessid: sessid,
appName: application,
// thanks to Ward DeBacker for this bug-fix:
//expiry: new Date((expiry - 4070908800) * 1000).toUTCString()
expiry: new Date(expiry * 1000).toUTCString()
expiry: new Date((expiry - 4070908800) * 1000).toUTCString()
}
});

Expand Down Expand Up @@ -202,7 +200,7 @@ var EWD = {
},
updateSessionExpiry: function(session) {
//var now = EWD.hSeconds();
var now = Math.floor(new Date().getTime()/1000);
var now = Math.floor(new Date().getTime()/1000) + 4070908800;
var sessid = session.sessid;
var timeout = +database.get({global: ewdChild.global.session, subscripts: ['session', sessid, 'ewd_sessionTimeout']}).data;
var savedExpiry = database.get({global: ewdChild.global.session, subscripts: ['session', sessid, 'ewd_sessionExpiry']}).data;
Expand Down Expand Up @@ -234,7 +232,7 @@ var EWD = {
var sessid;
var expiryNode;
var expiry;
var now = Math.floor(new Date().getTime()/1000);
var now = Math.floor(new Date().getTime()/1000) + 4070908800;
do {
node = database.order(node);
sessid = node.result || '';
Expand Down Expand Up @@ -861,7 +859,7 @@ var ewdChild = {

var token = EWD.createToken();
//var now = EWD.hSeconds();
var now = Math.floor(new Date().getTime()/1000);
var now = Math.floor(new Date().getTime()/1000) + 4070908800;
var timeout = messageObj.application.timeout || 3600;
var expiry = now + timeout;
var application = {name: 'undefined'};
Expand Down Expand Up @@ -889,9 +887,7 @@ var ewdChild = {
content: {
sessid: sessid,
appName: application.name,
// thanks to Ward DeBacker for this bug-fix
//expiry: new Date((expiry - 4070908800) * 1000).toUTCString()
expiry: new Date(expiry * 1000).toUTCString()
expiry: new Date((expiry - 4070908800) * 1000).toUTCString()
},
appName: 'ewdMonitor'
});
Expand Down