Permalink
Browse files

Fix #408 Move 'connecting' state up to catch TFO branch also

  • Loading branch information...
klirichek committed Aug 22, 2018
1 parent bb533d9 commit 248b72f1544b27e9e82773284050d44eeb1714e1
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/searchdha.cpp
@@ -2319,6 +2319,9 @@ bool AgentConn_t::EstablishConnection ()
if ( sphSetSockNB ( m_iSock )<0 )
return Fatal ( eConnectFailures, "sphSetSockNB() failed: %s", sphSockError () );
// connection in progress
State ( Agent_e::CONNECTING );
// prepare our data to send.
auto iTfoRes = DoTFO ( ( struct sockaddr * ) &ss, len );
if ( iTfoRes==1 )
@@ -2335,9 +2338,6 @@ bool AgentConn_t::EstablishConnection ()
if ( iErr==EINTR || !IS_PENDING_PROGRESS ( iErr ) ) // check for EWOULDBLOCK is for winsock only
return Fatal ( eConnectFailures, "connect() failed: errno=%d, %s", iErr, sphSockError ( iErr ) );
}
// connection in progress
State ( Agent_e::CONNECTING );
return SendQuery ();
}

0 comments on commit 248b72f

Please sign in to comment.