Commit ef07ac04 authored by Ivan Vilata-i-Balaguer's avatar Ivan Vilata-i-Balaguer
Browse files

Merge branch 'master' into doh-client

parents 46e914da 6c8a2bd5
......@@ -956,7 +956,7 @@ Session Client::State::fetch_fresh_through_simple_proxy
// Send request
http::async_write(con, request, yield[ec].tag("inj-request"));
if (!ec && cancel_slot) {
if (cancel_slot) {
ec = asio::error::operation_aborted;
}
......
......@@ -38,7 +38,7 @@ fetch_http( Stream& con
// Send the HTTP request to the remote host
http::async_write(con, req, yield[ec]);
if (!ec && cancel_slot) {
if (cancel_slot) {
ec = asio::error::operation_aborted;
}
if (ec) {
......@@ -55,7 +55,7 @@ fetch_http( Stream& con
// Receive the HTTP response
_recv_http_response(con, buffer, res, yield[ec]);
if (!ec && cancel_slot) {
if (cancel_slot) {
ec = asio::error::operation_aborted;
}
if (ec) {
......
......@@ -154,6 +154,7 @@ Session::flush_response(Cancel& cancel,
_head_was_read = true;
h(http_response::Part{std::move(_head)}, cancel, yield[ec]);
if (cancel) ec = asio::error::operation_aborted;
return_or_throw_on_error(yield, cancel, ec);
while (true) {
......@@ -162,6 +163,7 @@ Session::flush_response(Cancel& cancel,
return_or_throw_on_error(yield, cancel, ec);
if (!opt_part) break;
h(std::move(*opt_part), cancel, yield[ec]);
if (cancel) ec = asio::error::operation_aborted;
return_or_throw_on_error(yield, cancel, ec);
}
}
......
......@@ -72,7 +72,7 @@ public:
self->_self = nullptr;
self->_cancel_signal = nullptr;
if (!ec && cancel) ec = asio::error::operation_aborted;
if (cancel) ec = asio::error::operation_aborted;
self->_result = Result{ ec, std::move(retval) };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment