diff options
author | pixel <pixel> | 2008-07-22 14:10:09 +0000 |
---|---|---|
committer | pixel <pixel> | 2008-07-22 14:10:09 +0000 |
commit | ed9d185968ebc7a3ef1a570e0574e3ab72141c86 (patch) | |
tree | 62c6c2b078003dd2844c5dd2042212bda5242eed | |
parent | c2269558611313ada1a55c1de38efff7c8f26987 (diff) |
Fixing win32 SetNonBlock
-rw-r--r-- | lib/Handle.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc index c8e6abc..38fa11c 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Handle.cc,v 1.83 2008-05-14 02:13:05 pixel Exp $ */ +/* $Id: Handle.cc,v 1.84 2008-07-22 14:10:09 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -211,8 +211,11 @@ void Handle::SetNonBlock(void) { #elif defined _WIN32 // HACKY HACKY HACK!! // Let's think windows will behave correctly on a non-socket here... - u_long iMode = 1; - ioctlsocket(h, FIONBIO, &iMode); + if (!nonblock) { + u_long iMode = 1; + ioctlsocket(h, FIONBIO, &iMode); + } + nonblock = true; #endif } |