mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 11:54:30 +01:00
Adhoc: Fix shutdown hanging when it comes right after adhoc init
The friend finder thread set friendFinderRunning itself, after a DNS lookup of the adhoc server. A shutdown in that window cleared the flag first; the thread then set it again, looped forever, and the join in NetAdhocctl_Term() never returned. Gods Eater Burst hit this in about one headless run in six. The flag is now set before the thread is created, and a finished thread is joined before a new one replaces it, which would otherwise call std::terminate. The built-in adhoc server thread had the same race, behind its check for an existing server, and gets the same fix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
806618f9a3
commit
2cd84012d0
3 files changed
+14
-6
No files matched your search
@@ -1865,9 +1865,7 @@ int create_listen_socket(uint16_t port)
|
||||
*/
|
||||
int server_loop(int server)
|
||||
{
|
||||
// Set Running Status
|
||||
//_status = 1;
|
||||
adhocServerRunning = true;
|
||||
// adhocServerRunning was set by whoever started the thread, and is cleared to stop it.
|
||||
|
||||
// Create Empty Status Logfile
|
||||
update_status();
|
||||
|
||||
Reference in new issue
Block a user