File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -93,10 +93,14 @@ module.exports = function (connect) {
93
93
. then ( ( ) => {
94
94
this . initialized = true ;
95
95
} )
96
- . catch ( ( ) => {
97
- return this . createSessionsTable ( ) . then ( ( ) => {
98
- this . initialized = true ;
99
- } ) ;
96
+ . catch ( ( err ) => {
97
+ if ( err . name == 'ResourceNotFoundException' ) {
98
+ return this . createSessionsTable ( ) . then ( ( ) => {
99
+ this . initialized = true ;
100
+ } ) ;
101
+ } else {
102
+ throw err ;
103
+ }
100
104
} ) ;
101
105
} ;
102
106
@@ -342,7 +346,7 @@ module.exports = function (connect) {
342
346
const now = Math . floor ( Date . now ( ) / 1000 ) ;
343
347
const expires =
344
348
typeof sess . cookie . maxAge === "number"
345
- ? now + sess . cookie . maxAge
349
+ ? now + ( sess . cookie . maxAge / 1000 )
346
350
: now + oneDayInSeconds ;
347
351
return expires ;
348
352
} ;
You can’t perform that action at this time.
0 commit comments