Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8389 from sepalani/fix-so
Socket: Abort pending ops on close
  • Loading branch information
leoetlino committed Apr 22, 2020
2 parents a5bd263 + 5ec80a5 commit 2673280
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Core/Core/IOS/Network/Socket.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2673280

Please sign in to comment.