Fixed handling of winsock connect event. Was always immediately
indicating socket had connected.
This commit is contained in:
parent
4ac756fc28
commit
ffa966747b
|
@ -196,7 +196,7 @@ CArchNetworkWinsock::newSocket(EAddressFamily family, ESocketType type)
|
||||||
setBlockingOnSocket(fd, false);
|
setBlockingOnSocket(fd, false);
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
close(fd);
|
close_winsock(fd);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ CArchNetworkWinsock::newSocket(EAddressFamily family, ESocketType type)
|
||||||
socket->m_socket = fd;
|
socket->m_socket = fd;
|
||||||
socket->m_refCount = 1;
|
socket->m_refCount = 1;
|
||||||
socket->m_event = WSACreateEvent_winsock();
|
socket->m_event = WSACreateEvent_winsock();
|
||||||
socket->m_pollWrite = false;
|
socket->m_pollWrite = true;
|
||||||
return socket;
|
return socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ CArchNetworkWinsock::acceptSocket(CArchSocket s, CArchNetAddress* addr)
|
||||||
setBlockingOnSocket(fd, false);
|
setBlockingOnSocket(fd, false);
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
close(fd);
|
close_winsock(fd);
|
||||||
delete socket;
|
delete socket;
|
||||||
free(tmp);
|
free(tmp);
|
||||||
*addr = NULL;
|
*addr = NULL;
|
||||||
|
|
Loading…
Reference in New Issue