Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete sessionCallBlocked only by the same tab that added entry #279

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

bogdan-niculescu-sch
Copy link
Collaborator

@bogdan-niculescu-sch bogdan-niculescu-sch commented Apr 15, 2024

Currently, since local storage is shared between tabs, other tabs can clean session-service stop switch. Added logic to save tabId to sessionCallBlocked-cache instead of boolean value, and clean this entry only if tabId value matches

Copy link
Collaborator

@hunger-programmer hunger-programmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks ok, but for sure if you want to introduce this change, TTL should be adjusted in case that redirect didn't succeed.

I would set it to 5 seconds TOP. Long story short, this change is a bit risky and honestly it might break more than fix it.
const SESSION_CALL_BLOCKED_TTL = 1000 * 5;

Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 69.35484% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 97.10%. Comparing base (8ade01a) to head (8bf20df).
Report is 3 commits behind head on master.

❗ Current head 8bf20df differs from pull request most recent head 784c923. Consider uploading reports for the commit 784c923 to get more accurate results

Files Patch % Lines
src/identity.js 69.35% 15 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #279      +/-   ##
==========================================
- Coverage   99.85%   97.10%   -2.75%     
==========================================
  Files          14       14              
  Lines         668      692      +24     
  Branches      176      179       +3     
==========================================
+ Hits          667      672       +5     
- Misses          1       16      +15     
- Partials        0        4       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants