Apparently 0 is a vaid file descriptor in OSX

This commit is contained in:
Corysia Taware 2014-04-19 21:45:54 -07:00
parent 4d70cb20e7
commit f915eed0f4

View File

@ -97,8 +97,12 @@ void BaseTCPServer::ListenNewConnections() {
from.sin_family = AF_INET;
fromlen = sizeof(from);
LockMutex lock(&MSock);
#ifndef DARWIN // Corysia - On OSX, 0 is a valid fd.
if (!sock)
return;
#else
if (sock == -1) return;
#endif
// Check for pending connects
#ifdef _WINDOWS