Gracefully handle errors in socket creation #662

Merged
Vudjun merged 3 commits from socketcreatefix into master 2025-02-16 08:26:38 +00:00
Showing only changes of commit 2596c41832 - Show all commits

View File

@ -107,8 +107,8 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
} }
catch (SocketException exception) catch (SocketException exception)
{ {
var errNo = WinSockHelper.ConvertError((WsaError)exception.ErrorCode); LinuxError errNo = WinSockHelper.ConvertError((WsaError)exception.ErrorCode);
return WriteBsdResult(context, 0, errno); return WriteBsdResult(context, 0, errNo);
} }
int newSockFd = _context.RegisterFileDescriptor(newBsdSocket); int newSockFd = _context.RegisterFileDescriptor(newBsdSocket);