From ffa966747be2e2f0d111886238907f42da9832c0 Mon Sep 17 00:00:00 2001 From: crs Date: Sun, 29 Feb 2004 21:33:20 +0000 Subject: [PATCH] Fixed handling of winsock connect event. Was always immediately indicating socket had connected. --- lib/arch/CArchNetworkWinsock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/arch/CArchNetworkWinsock.cpp b/lib/arch/CArchNetworkWinsock.cpp index 0f69c554..484bb8ff 100644 --- a/lib/arch/CArchNetworkWinsock.cpp +++ b/lib/arch/CArchNetworkWinsock.cpp @@ -196,7 +196,7 @@ CArchNetworkWinsock::newSocket(EAddressFamily family, ESocketType type) setBlockingOnSocket(fd, false); } catch (...) { - close(fd); + close_winsock(fd); throw; } @@ -205,7 +205,7 @@ CArchNetworkWinsock::newSocket(EAddressFamily family, ESocketType type) socket->m_socket = fd; socket->m_refCount = 1; socket->m_event = WSACreateEvent_winsock(); - socket->m_pollWrite = false; + socket->m_pollWrite = true; return socket; } @@ -318,7 +318,7 @@ CArchNetworkWinsock::acceptSocket(CArchSocket s, CArchNetAddress* addr) setBlockingOnSocket(fd, false); } catch (...) { - close(fd); + close_winsock(fd); delete socket; free(tmp); *addr = NULL;