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: concurrent getSession calls #121

Merged
merged 2 commits into from
Jan 14, 2024
Merged

Conversation

edivados
Copy link
Contributor

@edivados edivados commented Jan 13, 2024

This should fix getting an empty session when calling useSession (or any util that uses getSession underneath) concurrently.
This can be reverted after being fixed upstream.

  • Added test
  • Copied the following functions from h3 to vinxi. useSession, getSession, updateSession, sealSession
  • Applied fix from the following PR to getSession

closes #120

References:

Note

I have no idea what happened to the formatting/diff in server.js.

Copy link

codesandbox bot commented Jan 13, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Jan 13, 2024

🦋 Changeset detected

Latest commit: 583364f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
vinxi Patch
test-react Patch
@vinxi/router Patch
example-react-server Patch
app Patch
example-react-spa-basic Patch
react-spa-mdx Patch
react-spa-tanstack-router-app Patch
example-react-spa-tanstack-router-app Patch
react-ssr-basic-cloudflare Patch
react-ssr-basic Patch
react-ssr-tanstack-router-app Patch
react-ssr-wouter Patch
solid-spa-basic Patch
solid-ssr-basic Patch
example-ssr-solid-router Patch
example-vanilla-empty Patch
example-vanilla-partyroom Patch
example-vanilla-spa Patch
example-vanilla-stack Patch
example-vanilla-trpc Patch
test-multi-spa Patch
test-react-rsc Patch
test-react-srv-fn Patch
react-ssr-test-fs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jan 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vinxi-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2024 9:51am

@edivados edivados changed the title Patch reading session fix: concurrent getSession calls Jan 13, 2024
@nksaraf nksaraf merged commit 8a6d755 into nksaraf:main Jan 14, 2024
7 checks passed
@edivados edivados deleted the patch-session branch January 14, 2024 16:13
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.

Inconsistent session data access
2 participants