Fix possible lock issue during AdhocMatchingStart

This commit is contained in:
ANR2ME committed 2021-02-04 10:15:29 +07:00
1 parent b7e1e9a066
commit f2e7a2a9ba
1 file changed
+3 -1
+3 -1
View File
@@ -4661,8 +4661,10 @@ int NetAdhocMatching_Start(int matchingId, int evthPri, int evthPartitionId, int
// Create PDP Socket
int sock = sceNetAdhocPdpCreate((const char*)&item->mac, static_cast<int>(item->port), item->rxbuflen, 0);
item->socket = sock;
if (sock < 1)
if (sock < 1) {
peerlock.unlock();
return hleLogError(SCENET, ERROR_NET_ADHOC_MATCHING_PORT_IN_USE, "adhoc matching port in use");
}
// Create & Start the Fake PSP Thread ("matching_ev%d" and "matching_io%d")
netAdhocValidateLoopMemory();