From 8a42c207dfa1e704e5c87e374c030fb98ad783da Mon Sep 17 00:00:00 2001 From: j Date: Tue, 20 Aug 2024 19:00:41 +1000 Subject: [PATCH] Add 5-second sleep on sceNetAccept as this can be called in an infinite loop and would normally block (this isn't ideal for non-blocking sockets but it's all stubs at the moment anyway) --- src/core/libraries/network/net.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/libraries/network/net.cpp b/src/core/libraries/network/net.cpp index 2c03dde3..492054de 100644 --- a/src/core/libraries/network/net.cpp +++ b/src/core/libraries/network/net.cpp @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include + #ifdef WIN32 #define _WINSOCK_DEPRECATED_NO_WARNINGS #include @@ -59,7 +61,8 @@ int PS4_SYSV_ABI sce_net_in6addr_nodelocal_allnodes() { } OrbisNetId PS4_SYSV_ABI sceNetAccept(OrbisNetId s, OrbisNetSockaddr* addr, u32* paddrlen) { - LOG_ERROR(Lib_Net, "(STUBBED) called"); + LOG_ERROR(Lib_Net, "(STUBBED) called [sleeping]"); + std::this_thread::sleep_for(std::chrono::seconds(5)); return ORBIS_OK; }