aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary <mary@mary.zone>2022-09-01 20:12:10 +0200
committerMary-nyan <thog@protonmail.com>2022-09-01 21:46:11 +0200
commit67cbdc3a6a43a8fa75d1034847abc2fdc3213c6f (patch)
tree67557af9a0d74133ab2915630c149b73a208dd70
parent131b43170e28d598f0f9991937544f3f1aab79a3 (diff)
bsd: Fix Poll(0) returning ETIMEDOUT instead of SUCCESS1.1.246
This was an oversight of the implementation.
-rw-r--r--Ryujinx.HLE/HOS/Services/Sockets/Bsd/IClient.cs6
1 files changed, 6 insertions, 0 deletions
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<PollEventData>()), 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);
}