small fix for Windows

This commit is contained in:
Volker Fischer 2014-02-17 18:34:39 +00:00
parent 14c8df9ee4
commit 3f61c348f7

View File

@ -138,12 +138,12 @@ void CSocket::Init ( const quint16 iPortNumber )
void CSocket::Close()
{
#ifdef _WIN32
// closesocket will cause recvfrom to return with an error because the
// socket is closed -> then the thread can safely be shut down
#ifdef _WIN32
// TODO also use shutdown of the socket on Windows...
closesocket ( UdpSocket );
closesocket ( UdpSocket );
#else
// on OSs other than Windows, the shutdown call cancels the recvfrom
shutdown ( UdpSocket, SHUT_RDWR );
#endif
}