From 7c9944b478dae58ac03e2dbadbd4a2814e6410aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 31 Oct 2026 09:04:00 +0100 Subject: [PATCH] sceNetAdhoc: Forget a blocking PTP connect when it's done Its entry in sendTargetPeers stayed, so the next blocking connect from the same thread on a socket that got the same id returned BUSY (pspautotests net/adhoc/pair/basic, connect to a closed port, after a connected socket was closed). Co-Authored-By: Claude Opus 5.5 --- Core/HLE/sceNetAdhoc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index a0e2a3d03f..9fd16d1292 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -1361,6 +1361,8 @@ static void __AdhocSocketNotify(u64 userdata, int cyclesLate) { CoreTiming::ScheduleEvent(usToCycles(delayUS) - cyclesLate, adhocSocketNotifyEvent, userdata); return; } + // Done with it, or the next blocking connect on a socket that reuses this id would be BUSY. + sendTargetPeers.erase(userdata); break; case PTP_FLUSH: