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

Use unique ids in call_server_method #55

Merged

Conversation

patkub
Copy link
Contributor

@patkub patkub commented May 10, 2022

Tested this in Chrome console, not on Steam Deck yet.

// test
console.log(uuidv4());console.log(uuidv4());console.log(uuidv4());
// 08ad8294-06af-4f3c-9bfb-b1cace537df3
// ae64aa70-8d9d-4ef9-815f-c4198584eb1a
// 266f2f27-d774-4913-b984-8c4ddba004e6

console.log(new Date().getTime());console.log(new Date().getTime());console.log(new Date().getTime());
// 1652143359237
// 1652143359237
// 1652143359237

fixes #53

@NGnius
Copy link
Contributor

NGnius commented May 10, 2022

Looks like this would fix the race condition when that function is called too quickly as well. Thanks for putting in the work!

@patkub
Copy link
Contributor Author

patkub commented May 10, 2022

That was the intention, linked it to the issue.

@marios8543 marios8543 merged commit 945db5d into SteamDeckHomebrew:main May 10, 2022
KP2048 pushed a commit to EmuDeck/decky-loader that referenced this pull request May 4, 2023
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.

Race condition in call_plugin_method
3 participants