1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

fix(session): increased session + bug fixed

This commit is contained in:
Saad Jutt
2022-03-24 20:22:06 +05:00
parent dd56a95314
commit 117a53ceea
3 changed files with 6 additions and 5 deletions

View File

@@ -23,7 +23,9 @@ export class FileUploadController {
const sessionController = getSessionController()
session = await sessionController.getSession()
session.inUse = true
// marking consumed true, so that it's not available
// as readySession for any other request
session.consumed = true
req.sasSession = session

View File

@@ -31,7 +31,7 @@ export class SessionController {
? readySessions[0]
: await this.createSession()
if (readySessions.length < 2) this.createSession()
if (readySessions.length < 3) this.createSession()
return session
}

View File

@@ -143,9 +143,8 @@ const executeReturnRaw = async (
query
)) as ExecuteReturnRaw
// Should over-ride response header for
// debug on GET request to see entire log
// rendering on browser.
// Should over-ride response header for debug
// on GET request to see entire log rendering on browser.
if (isDebugOn(query)) {
httpHeaders['content-type'] = 'text/plain'
}