Skip to content

Commit

Permalink
During timeout, there is a race to determine the exact error code. To…
Browse files Browse the repository at this point in the history
… ensure timeouts always result in std::errc::timed_out, we trigger entirely off of the timer's state instead of considering the error code.
  • Loading branch information
Casablanca Team committed Aug 4, 2016
1 parent 7224d35 commit 2e99d10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Release/src/http/client/http_client_asio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ class asio_context : public request_context, public std::enable_shared_from_this
long errorcodeValue = ec.value();

// map timer cancellation to time_out
if (ec == boost::system::errc::operation_canceled && m_timer.has_timedout())
if (m_timer.has_timedout())
{
errorcodeValue = make_error_code(std::errc::timed_out).value();
}
Expand Down

0 comments on commit 2e99d10

Please sign in to comment.