Skip to content

fix(session): gate cookie-watcher probes by session value and interval - #241

Merged
spotta85 merged 2 commits into
Longhorn-Developers:mainfrom
samsinghh:fix/session-cookie-probe-loop
Aug 18, 2026
Merged

fix(session): gate cookie-watcher probes by session value and interval#241
spotta85 merged 2 commits into
Longhorn-Developers:mainfrom
samsinghh:fix/session-cookie-probe-loop

Conversation

@samsinghh

Copy link
Copy Markdown
Contributor

Bug:

  • registerSessionCookieWatcher() re-fetched history/ every time the UT session cookie was set
  • UT re-sets that cookie on every response, and Chrome send an onChanged even for the identical value, so the probe triggered itself in a loop (~10 req/s in the background whenever logged in)

Fix:

  • the watcher now only probes when the session id actually changes, and at most once per minute.
  • a real cookie removal resets it so re-login is still detected
  • added some unit tests for this as well

@spotta85

Copy link
Copy Markdown
Collaborator

Yeah this is great man good work! thanks for fixing this I didnt even notice that this was an issue

@spotta85
spotta85 merged commit 570c852 into Longhorn-Developers:main Aug 18, 2026
4 of 5 checks passed
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