Skip to content

Commit

Permalink
Fix #408 Move 'connecting' state up to catch TFO branch also
Browse files Browse the repository at this point in the history
  • Loading branch information
klirichek committed Aug 22, 2018
1 parent bb533d9 commit 248b72f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/searchdha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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 ();
}

Expand Down

0 comments on commit 248b72f

Please sign in to comment.