Skip to content

Add mutex to ensure thread-safe access to token refresh logic#30

Open
0x113 wants to merge 1 commit into
supabase-community:mainfrom
0x113:main
Open

Add mutex to ensure thread-safe access to token refresh logic#30
0x113 wants to merge 1 commit into
supabase-community:mainfrom
0x113:main

Conversation

@0x113

@0x113 0x113 commented Jan 25, 2025

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix.

What is the current behavior?

When multiple requests are made, the current code returns a panic because of concurrent writes to the map.

What is the new behavior?

No more panic :) Added mutex lock to ensure thread safety.

Additional context

N/A

@MABKTRADER

Copy link
Copy Markdown

We good

@kamil-morawski

Copy link
Copy Markdown

I also had this issue, this helps a lot. Would be nice if it got merged

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.

3 participants