Skip to content

Commit

Permalink
Merge branch 'fix-transport-recv' into 'master'
Browse files Browse the repository at this point in the history
Fix transport recv return value

See merge request app-frameworks/esp-aws-iot!70
  • Loading branch information
avsheth committed Aug 30, 2024
2 parents 4515d57 + fed617c commit cd1bd3b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ int32_t espTlsTransportSend( NetworkContext_t* pxNetworkContext,
int32_t espTlsTransportRecv( NetworkContext_t* pxNetworkContext,
void* pvData, size_t uxDataLen )
{
int32_t lBytesRead = 0;
int32_t lBytesRead = -1;

if( ( pvData != NULL ) &&
( uxDataLen > 0 ) &&
Expand All @@ -222,6 +222,8 @@ int32_t espTlsTransportRecv( NetworkContext_t* pxNetworkContext,
fd_set read_fds;
fd_set error_fds;

lBytesRead = 0;

esp_tls_get_conn_sockfd( pxNetworkContext->pxTls, &lSockFd );
FD_ZERO( &read_fds );
FD_SET( lSockFd, &read_fds );
Expand Down

0 comments on commit cd1bd3b

Please sign in to comment.