mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibCore: Use WinSock2 closesocket() in PosixSocketHelper::close()
Our Core::System::is_socket() helper is not very robust, as it was incorrectly marking m_fd as a non-socket fd. This meant we were trying to call CLoseHandle() on a socket which fails. We can just call closesocket() directly given we are in an explicit socket-only context.
This commit is contained in:
parent
7683f1285f
commit
5e529fc603
Notes:
github-actions[bot]
2025-10-30 03:08:58 +00:00
Author: https://github.com/ayeteadoe
Commit: 5e529fc603
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5981
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/R-Goc
Reviewed-by: https://github.com/sakgoyal
Reviewed-by: https://github.com/stasoid
1 changed files with 1 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ void PosixSocketHelper::close()
|
|||
|
||||
// shutdown is required for another end to receive FD_CLOSE
|
||||
shutdown(m_fd, SD_BOTH);
|
||||
MUST(System::close(m_fd));
|
||||
closesocket(m_fd);
|
||||
m_fd = -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue