diff --git a/core/app.js b/core/app.js index e4b35758..e4609b4e 100644 --- a/core/app.js +++ b/core/app.js @@ -10,7 +10,7 @@ let gSessionIndex = 0; * @returns */ function makeSessionId() { - return (gSessionIndex++).toString(); + return 'session_' + (gSessionIndex++).toString(); } /** @@ -172,7 +172,7 @@ async function socket(request, response, client) { 0x1 ); } else { - process = await core.getSessionProcessBlob( + process = await core.getProcessBlob( blobId, sessionId, options diff --git a/core/core.js b/core/core.js index d920cea9..edb1b611 100644 --- a/core/core.js +++ b/core/core.js @@ -258,23 +258,6 @@ function postMessageInternal(from, to, message) { } } -/** - * TODOC - * @param {*} blobId - * @param {*} session - * @param {*} options - * @returns - */ -async function getSessionProcessBlob(blobId, session, options) { - let actualOptions = {timeout: kPingInterval}; - if (options) { - for (let i in options) { - actualOptions[i] = options[i]; - } - } - return getProcessBlob(blobId, 'session_' + session, actualOptions); -} - /** * TODOC * @param {*} blobId @@ -302,7 +285,7 @@ async function getProcessBlob(blobId, key, options) { } process.lastActive = Date.now(); process.lastPing = null; - process.timeout = options.timeout; + process.timeout = kPingInterval; process.ready = new Promise(function (resolve, reject) { resolveReady = resolve; rejectReady = reject; @@ -1302,4 +1285,4 @@ async function storePermission(user, packageOwner, packageName, permission, allo } } -export {invoke, getSessionProcessBlob}; +export {invoke, getProcessBlob};