Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions boost/network/protocol/http/client/connection/async_normal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ struct http_async_connection
std::uint16_t source_port = request.source_port();

auto self = this->shared_from_this();
if (timeout_ > 0) {
timer_.expires_from_now(std::chrono::seconds(timeout_));
timer_.async_wait(request_strand_.wrap([=] (boost::system::error_code const &ec) {
self->handle_timeout(ec);
}));
}
resolve_(resolver_, host_, port_,
request_strand_.wrap(
[=] (boost::system::error_code const &ec,
resolver_iterator_pair endpoint_range) {
self->handle_resolved(host_, port_, source_port, get_body,
callback, generator, ec, endpoint_range);
}));
if (timeout_ > 0) {
timer_.expires_from_now(std::chrono::seconds(timeout_));
timer_.async_wait(request_strand_.wrap([=] (boost::system::error_code const &ec) {
self->handle_timeout(ec);
}));
}
return response_;
}

Expand Down