Merge pull request #8389 from sepalani/fix-so
Socket: Abort pending ops on close
This commit is contained in:
commit
2673280614
|
@ -170,6 +170,12 @@ s32 WiiSocket::CloseFd()
|
||||||
ReturnValue = WiiSockMan::GetNetErrorCode(EITHER(WSAENOTSOCK, EBADF), "CloseFd", false);
|
ReturnValue = WiiSockMan::GetNetErrorCode(EITHER(WSAENOTSOCK, EBADF), "CloseFd", false);
|
||||||
}
|
}
|
||||||
fd = -1;
|
fd = -1;
|
||||||
|
|
||||||
|
for (auto it = pending_sockops.begin(); it != pending_sockops.end();)
|
||||||
|
{
|
||||||
|
GetIOS()->EnqueueIPCReply(it->request, -SO_ENOTCONN);
|
||||||
|
it = pending_sockops.erase(it);
|
||||||
|
}
|
||||||
return ReturnValue;
|
return ReturnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue