Skip to content

Commit 2e99d10

Browse files
author
Casablanca Team
committed
During timeout, there is a race to determine the exact error code. To ensure timeouts always result in std::errc::timed_out, we trigger entirely off of the timer's state instead of considering the error code.
1 parent 7224d35 commit 2e99d10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Release/src/http/client/http_client_asio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ class asio_context : public request_context, public std::enable_shared_from_this
804804
long errorcodeValue = ec.value();
805805

806806
// map timer cancellation to time_out
807-
if (ec == boost::system::errc::operation_canceled && m_timer.has_timedout())
807+
if (m_timer.has_timedout())
808808
{
809809
errorcodeValue = make_error_code(std::errc::timed_out).value();
810810
}

0 commit comments

Comments
 (0)