diff --git a/demos/http/http_demo_s3_upload/http_demo_s3_upload.c b/demos/http/http_demo_s3_upload/http_demo_s3_upload.c index 88f0cbe78a..05aa0b9ec7 100644 --- a/demos/http/http_demo_s3_upload/http_demo_s3_upload.c +++ b/demos/http/http_demo_s3_upload/http_demo_s3_upload.c @@ -44,6 +44,9 @@ /*Include backoff algorithm header for retry logic.*/ #include "backoff_algorithm.h" +/* Clock for timer. */ +#include "clock.h" + /* Check that TLS port of the server is defined. */ #ifndef HTTPS_PORT #error "Please define a HTTPS_PORT." @@ -554,6 +557,9 @@ static bool uploadS3ObjectFile( const TransportInterface_t * pTransportInterface response.pBuffer = userBuffer; response.bufferLen = USER_BUFFER_LENGTH; + /* Enable use of HTTP_SEND_RETRY_TIMEOUT_MS */ + response.getTime = Clock_GetTimeMs; + if( httpStatus == HTTPSuccess ) { httpStatus = HTTPClient_InitializeRequestHeaders( &requestHeaders,