Socket: Abort pending operations on close

This commit is contained in:
Sepalani 2019-10-06 18:43:01 +04:00
parent 2d8758daaa
commit 5ec80a554c
1 changed files with 6 additions and 0 deletions

View File

@ -170,6 +170,12 @@ s32 WiiSocket::CloseFd()
ReturnValue = WiiSockMan::GetNetErrorCode(EITHER(WSAENOTSOCK, EBADF), "CloseFd", false);
}
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;
}