mirror of
https://github.com/glest/glest-source.git
synced 2025-09-27 07:59:00 +02:00
Bugfix for connecting to invalid IP Address will now properly detect a failed connection attempt.
This commit is contained in:
@@ -683,7 +683,7 @@ void ClientSocket::connect(const Ip &ip, int port)
|
||||
fprintf(stderr, "%s\n", WSAGetLastErrorMessage(szBuf));
|
||||
//fprintf(stderr, "%s", szBuf);
|
||||
|
||||
if (WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK)
|
||||
if (WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK)
|
||||
{
|
||||
fd_set myset;
|
||||
struct timeval tv;
|
||||
@@ -746,7 +746,8 @@ void ClientSocket::connect(const Ip &ip, int port)
|
||||
if(err < 0)
|
||||
{
|
||||
fprintf(stderr, "In [%s::%s] Before END sock = %d, err = %d, errno = %d\n",__FILE__,__FUNCTION__,sock,err,WSAGetLastError());
|
||||
//throwException(szBuf);
|
||||
//throwException(szBuf);
|
||||
disconnectSocket();
|
||||
}
|
||||
|
||||
fprintf(stderr, "Valid recovery for connection sock = %d, err = %d, WSAGetLastError() = %d\n",sock,err,WSAGetLastError());
|
||||
|
Reference in New Issue
Block a user