diff --git a/Csocket.cpp b/Csocket.cpp index 27e9b65f..c510c39b 100644 --- a/Csocket.cpp +++ b/Csocket.cpp @@ -2051,11 +2051,14 @@ int Csock::DNSLookup( EDNSLType eDNSLType ) iRet = GetAddrInfo( m_shostname, m_address ); } - if( !CreateSocksFD() ) - iRet = ETIMEDOUT; - if ( iRet == 0 ) { + if( !CreateSocksFD() ) + { + m_iDNSTryCount = 0; + return ETIMEDOUT; + } + if ( m_eConState != CST_OK ) m_eConState = ( ( eDNSLType == DNS_VHOST ) ? CST_BINDVHOST : CST_CONNECT ); m_iDNSTryCount = 0;