Skip to content

Commit

Permalink
v1.2.41
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-person committed Sep 8, 2022
1 parent e6f6782 commit 271317f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.2.41

- handle removeStaleSessions of .get() returning undefined from corrupted session files

## v1.2.4

- fix crashes from corrupted sessions
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rammerhead",
"version": "1.2.4",
"version": "1.2.41",
"description": "User friendly web proxy powered by testcafe-hammerhead",
"main": "src/index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions src/classes/RammerheadSessionFileCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ class RammerheadSessionFileCache extends RammerheadSessionAbstractStore {
const now = Date.now();
for (const id of sessionIds) {
const session = this.get(id, false, false);
if (!session) {
this.logger.debug(`(FileCache._removeStaleSessions) skipping ${id} as .get() returned undefined`);
continue;
}
if (
(staleTimeout && now - session.lastUsed > staleTimeout) ||
(maxToLive && now - session.createdAt > maxToLive)
Expand Down

0 comments on commit 271317f

Please sign in to comment.