fix shutdown issue on Mac OS

This commit is contained in:
Volker Fischer 2014-02-18 19:36:09 +00:00
parent 3f61c348f7
commit 4fbe460041

View file

@ -142,8 +142,11 @@ void CSocket::Close()
// closesocket will cause recvfrom to return with an error because the
// socket is closed -> then the thread can safely be shut down
closesocket ( UdpSocket );
#elif defined ( __APPLE__ ) || defined ( __MACOSX )
// on Mac the general close has the same effect as closesocket on Windows
close ( UdpSocket );
#else
// on OSs other than Windows, the shutdown call cancels the recvfrom
// on Linux the shutdown call cancels the recvfrom
shutdown ( UdpSocket, SHUT_RDWR );
#endif
}