From 67cbdc3a6a43a8fa75d1034847abc2fdc3213c6f Mon Sep 17 00:00:00 2001 From: Mary Date: Thu, 1 Sep 2022 20:12:10 +0200 Subject: [PATCH] bsd: Fix Poll(0) returning ETIMEDOUT instead of SUCCESS This was an oversight of the implementation. --- Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs index 4e1bb12f..e056e331 100644 --- a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs +++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs @@ -336,6 +336,12 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd context.Memory.Write(outputBufferPosition + (ulong)(i * Unsafe.SizeOf()), events[i].Data); } + // In case of non blocking call timeout should not be returned. + if (timeout == 0 && errno == LinuxError.ETIMEDOUT) + { + errno = LinuxError.SUCCESS; + } + return WriteBsdResult(context, updateCount, errno); }