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 unsafe netplay code in SI_DeviceGCController #12034

Merged

Conversation

MaverickAmon02
Copy link
Contributor

By misusing Config, this netplay-related code opened up a race condition between Config::OnConfigChanged() and SerialInterface::SerialInterfaceManager::UpdateDevices() that could cause iterator invalidation.

By misusing Config, this netplay-related code opened up a race condition between Config::OnConfigChanged() and SerialInterface::SerialInterfaceManager::UpdateDevices() that could cause iterator invalidation.
@AdmiralCurtiss
Copy link
Contributor

This sounds reasonable to me. Is there ever a situation where the config value and the SI value should be different?

@MaverickAmon02
Copy link
Contributor Author

At first I was going to say yes, the one second delay while changing to a different device, but I was unaware until now that you can't change devices while on Netplay. Even if you could, I think this would be an improvement, since it would line up with what device is actually currently being used.
I have tested with a Netplay session on my localhost, and rumble is still being re-routed as expected, so I think this change is all good.

@AdmiralCurtiss
Copy link
Contributor

Well, let's just try it and see if any issues pop up.

@AdmiralCurtiss AdmiralCurtiss merged commit 80c44ea into dolphin-emu:master Jul 9, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants