File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -395,7 +395,7 @@ class winhttp_client : public _http_client_communicator
395
395
}
396
396
397
397
// Set timeouts.
398
- int milliseconds = static_cast <int >(std::chrono::duration_cast <std::chrono::milliseconds>(config. timeout () ).count ());
398
+ int milliseconds = static_cast <int >(config. timeout <std::chrono::milliseconds>().count ());
399
399
milliseconds = std::max<decltype (milliseconds)>(milliseconds, 1 );
400
400
if (!WinHttpSetTimeouts (m_hSession,
401
401
milliseconds,
Original file line number Diff line number Diff line change @@ -463,7 +463,7 @@ class winrt_client : public _http_client_communicator
463
463
}
464
464
465
465
// Set timeout.
466
- ULONGLONG timeout = static_cast <ULONGLONG>(std::chrono::duration_cast <std::chrono::milliseconds>(config. timeout () ).count ());
466
+ ULONGLONG timeout = static_cast <ULONGLONG>(config. timeout <std::chrono::milliseconds>().count ());
467
467
timeout = std::max<decltype (timeout)>(timeout, std::numeric_limits<decltype (timeout)>::min () + 1 );
468
468
hr = winrt_context->m_hRequest ->SetProperty (XHR_PROP_TIMEOUT, timeout);
469
469
if (FAILED (hr))
You can’t perform that action at this time.
0 commit comments