aws_tcp_echo_client_single_task.c : a time-out is not fatal
@@ -323,7 +323,7 @@ static void prvEchoClientTask( void * pvParameters )
/* If an error occurred it will be latched in xReceivedBytes,
* otherwise xReceived bytes will be just that - the number of
* bytes received from the echo server. */
- if( xReceivedBytes > 0 )
+ if( xReceivedBytes == xTransmitted )
{
/* Compare the transmitted string to the received string. */
configASSERT( strncmp( pcReceivedString, pcTransmittedString, xTransmitted ) == 0 );
@@ -350,6 +350,11 @@ static void prvEchoClientTask( void * pvParameters )
}
else
{
+ /* The received length did not match the transmitted
+ * length. */
+ ulTxRxFailures[ xInstance ]++;
+ configPRINTF( ( "ERROR: xTransmitted %d xReceivedBytes %d \r\n",
+ ( int ) xTransmitted, ( int ) xReceivedBytes ) );
/* Timed out without receiving anything? */
break;
}
