From e9327c9bb864562446d40aca7bbf8140e3687d96 Mon Sep 17 00:00:00 2001 From: Adam Lowman Date: Sun, 18 Jul 2004 23:37:48 +0000 Subject: [PATCH] Fixed nonblocking bug for accept function. Joshua Allen on Adam's CVS account. My account is still broken. --- stepmania/src/ezsockets.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/ezsockets.cpp b/stepmania/src/ezsockets.cpp index ab00eb3816..b0a24b507e 100644 --- a/stepmania/src/ezsockets.cpp +++ b/stepmania/src/ezsockets.cpp @@ -100,6 +100,9 @@ bool EzSockets::listen() { #endif bool EzSockets::accept(EzSockets &socket) { + if (!blocking && !CanRead()) + return false; + int length = sizeof(socket); socket.sock = ::accept(sock,(struct sockaddr*) &socket.addr,(socklen_t*) &length);