Skip to content

Commit 5c01217

Browse files
authored
Setup timeouts before TLS starting TLS handshake (aws#3503)
This was reported here - aws#3458 Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
1 parent 747f074 commit 5c01217

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libraries/abstractions/transport/secure_sockets/transport_secure_sockets.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -455,13 +455,6 @@ static TransportSocketStatus_t establishConnect( NetworkContext_t * pNetworkCont
455455
}
456456
}
457457

458-
if( returnStatus == TRANSPORT_SOCKET_STATUS_SUCCESS )
459-
{
460-
/* Establish the TCP connection. */
461-
returnStatus = connectToServer( tcpSocket,
462-
pServerInfo );
463-
}
464-
465458
if( returnStatus == TRANSPORT_SOCKET_STATUS_SUCCESS )
466459
{
467460
/* Configure send and receive timeouts for the socket. */
@@ -474,6 +467,13 @@ static TransportSocketStatus_t establishConnect( NetworkContext_t * pNetworkCont
474467
}
475468
}
476469

470+
if( returnStatus == TRANSPORT_SOCKET_STATUS_SUCCESS )
471+
{
472+
/* Establish the TCP connection. */
473+
returnStatus = connectToServer( tcpSocket,
474+
pServerInfo );
475+
}
476+
477477
if( returnStatus == TRANSPORT_SOCKET_STATUS_SUCCESS )
478478
{
479479
/* Set the socket in the network context. */

0 commit comments

Comments
 (0)