|
33 | 33 | return E_INVALIDARG;
|
34 | 34 | }
|
35 | 35 |
|
36 |
| - auto httpSingleton = get_http_singleton(true); |
| 36 | + auto httpSingleton = get_http_singleton(); |
37 | 37 | if (nullptr == httpSingleton)
|
38 | 38 | return E_HC_NOT_INITIALISED;
|
39 | 39 |
|
@@ -105,7 +105,7 @@ HRESULT perform_http_call(
|
105 | 105 | HRESULT hr = XAsyncBegin(asyncBlock, call, reinterpret_cast<void*>(perform_http_call), __FUNCTION__,
|
106 | 106 | [](XAsyncOp opCode, const XAsyncProviderData* data)
|
107 | 107 | {
|
108 |
| - auto httpSingleton = get_http_singleton(false); |
| 108 | + auto httpSingleton = get_http_singleton(); |
109 | 109 | if (nullptr == httpSingleton)
|
110 | 110 | {
|
111 | 111 | return E_HC_NOT_INITIALISED;
|
@@ -259,7 +259,7 @@ bool http_call_should_retry(
|
259 | 259 | {
|
260 | 260 | auto retryAfterTime = retryAfter + responseReceivedTime;
|
261 | 261 | http_retry_after_api_state state(retryAfterTime, httpStatus);
|
262 |
| - auto httpSingleton = get_http_singleton(false); |
| 262 | + auto httpSingleton = get_http_singleton(); |
263 | 263 | if (httpSingleton)
|
264 | 264 | {
|
265 | 265 | httpSingleton->set_retry_state(call->retryAfterCacheId, state);
|
@@ -371,7 +371,7 @@ void retry_http_call_until_done(
|
371 | 371 | _In_ HC_UNIQUE_PTR<retry_context> retryContext
|
372 | 372 | )
|
373 | 373 | {
|
374 |
| - auto httpSingleton = get_http_singleton(false); |
| 374 | + auto httpSingleton = get_http_singleton(); |
375 | 375 | if (nullptr == httpSingleton)
|
376 | 376 | {
|
377 | 377 | HC_TRACE_WARNING(HTTPCLIENT, "Http call after HCCleanup was called. Aborting call.");
|
@@ -426,7 +426,7 @@ void retry_http_call_until_done(
|
426 | 426 | HC_UNIQUE_PTR<XAsyncBlock> nestedAsyncPtr{ nestedAsyncBlock };
|
427 | 427 | HC_UNIQUE_PTR<retry_context> retryContext{ static_cast<retry_context*>(nestedAsyncBlock->context) };
|
428 | 428 |
|
429 |
| - auto httpSingleton = get_http_singleton(false); |
| 429 | + auto httpSingleton = get_http_singleton(); |
430 | 430 | if (httpSingleton == nullptr)
|
431 | 431 | {
|
432 | 432 | HC_TRACE_WARNING(HTTPCLIENT, "Http completed after HCCleanup was called. Aborting call.");
|
|
507 | 507 | HRESULT hr = XAsyncBegin(asyncBlock, retryContext.get(), reinterpret_cast<void*>(HCHttpCallPerformAsync), __FUNCTION__,
|
508 | 508 | [](_In_ XAsyncOp op, _In_ const XAsyncProviderData* data)
|
509 | 509 | {
|
510 |
| - auto httpSingleton = get_http_singleton(false); |
| 510 | + auto httpSingleton = get_http_singleton(); |
511 | 511 | if (nullptr == httpSingleton)
|
512 | 512 | {
|
513 | 513 | return E_HC_NOT_INITIALISED;
|
|
0 commit comments