Skip to content

Commit 9e93847

Browse files
Fix http_demo_s3_upload 'Timed out in transport send' for files large… (#1949)
Co-authored-by: Kody Stribrny <[email protected]>
1 parent 3d170a0 commit 9e93847

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

demos/http/http_demo_s3_upload/http_demo_s3_upload.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
/*Include backoff algorithm header for retry logic.*/
4545
#include "backoff_algorithm.h"
4646

47+
/* Clock for timer. */
48+
#include "clock.h"
49+
4750
/* Check that TLS port of the server is defined. */
4851
#ifndef HTTPS_PORT
4952
#error "Please define a HTTPS_PORT."
@@ -554,6 +557,9 @@ static bool uploadS3ObjectFile( const TransportInterface_t * pTransportInterface
554557
response.pBuffer = userBuffer;
555558
response.bufferLen = USER_BUFFER_LENGTH;
556559

560+
/* Enable use of HTTP_SEND_RETRY_TIMEOUT_MS */
561+
response.getTime = Clock_GetTimeMs;
562+
557563
if( httpStatus == HTTPSuccess )
558564
{
559565
httpStatus = HTTPClient_InitializeRequestHeaders( &requestHeaders,

0 commit comments

Comments
 (0)