Fix 64-bit compile error.

This commit is contained in:
Sönke Ludwig 2017-06-27 00:54:32 +02:00
parent c55eeaf476
commit 077c643e08

View file

@ -389,7 +389,7 @@ final class WinAPIEventDriverSockets : EventDriverSockets {
if (fd == INVALID_SOCKET) if (fd == INVALID_SOCKET)
return DatagramSocketFD.invalid; return DatagramSocketFD.invalid;
auto sock = adoptDatagramSocket(fd); auto sock = adoptDatagramSocketInternal(fd);
if (target_address !is null) if (target_address !is null)
setTargetAddress(sock, target_address); setTargetAddress(sock, target_address);
@ -398,6 +398,11 @@ final class WinAPIEventDriverSockets : EventDriverSockets {
} }
final override DatagramSocketFD adoptDatagramSocket(int socket) final override DatagramSocketFD adoptDatagramSocket(int socket)
{
return adoptDatagramSocketInternal(socket);
}
private DatagramSocketFD adoptDatagramSocketInternal(SOCKET socket)
{ {
auto fd = DatagramSocketFD(socket); auto fd = DatagramSocketFD(socket);
if (m_sockets[fd].common.refCount) // FD already in use? if (m_sockets[fd].common.refCount) // FD already in use?