From ed9d185968ebc7a3ef1a570e0574e3ab72141c86 Mon Sep 17 00:00:00 2001 From: pixel Date: Tue, 22 Jul 2008 14:10:09 +0000 Subject: Fixing win32 SetNonBlock --- lib/Handle.cc | 9 ++++++--- 1 file 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 #include @@ -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 } -- cgit v1.2.3