Azure / azure-c-shared-utility

Azure C SDKs common code
Other
111 stars 203 forks source link

Define RETRY_INTERVAL_IN_MIliSECONDS in httpapi_compact wrongly named #551

Closed JavierReyes945 closed 3 years ago

JavierReyes945 commented 3 years ago

In adapters/httpapi_compact.c Line 42:

/*Codes_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/
#define RETRY_INTERVAL_IN_MICROSECONDS  100

The defined element is used overall in this function and many others though the module.

/*Codes_SRS_HTTPAPI_COMPACT_21_086: [ The HTTPAPI_CloseConnection shall wait, at least, 100 milliseconds between retries. ]*/
ThreadAPI_Sleep(RETRY_INTERVAL_IN_MICROSECONDS);

The called function expects a value in milliseconds:

/**
 * @brief    Sleeps the current thread for the given number of milliseconds.
 *
 * @param    milliseconds    The number of milliseconds to sleep.
 */
MOCKABLE_FUNCTION(, void, ThreadAPI_Sleep, unsigned int, milliseconds);
danewalton commented 3 years ago

Hi @JavierReyes945 this has been updated. Thanks for letting us know!