mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-19 14:36:15 +00:00
fix windows screaming
This commit is contained in:
@@ -525,7 +525,11 @@ std::pair<s32, Network::Errno> BSD::SocketImpl(Network::Domain domain, Network::
|
||||
}
|
||||
auto const bsd_errno = descriptor.socket->Initialize(domain, type, protocol);
|
||||
descriptor.is_connection_based = IsConnectionBased(type);
|
||||
#ifdef _WIN32
|
||||
if (descriptor.socket->fd == INVALID_SOCKET) {
|
||||
#else
|
||||
if (descriptor.socket->fd == Network::Socket::INVALID_SOCKET) {
|
||||
#endif
|
||||
file_descriptors[fd].reset();
|
||||
return {-1, bsd_errno};
|
||||
}
|
||||
|
||||
@@ -925,10 +925,8 @@ std::pair<s32, Errno> Poll(std::span<HostPollFD> pollfds, s32 timeout) {
|
||||
}
|
||||
|
||||
Socket::~Socket() {
|
||||
if (fd == INVALID_SOCKET) {
|
||||
return;
|
||||
}
|
||||
(void)closesocket(fd);
|
||||
if (fd != INVALID_SOCKET)
|
||||
(void)closesocket(fd);
|
||||
fd = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user