diff --git a/common/TCPServer.cpp b/common/TCPServer.cpp index cfba6e94a..2e3abfe2f 100644 --- a/common/TCPServer.cpp +++ b/common/TCPServer.cpp @@ -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