Skip to content

Commit

Permalink
http/client: Restore indentation of client::do_make_request overload
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Emelyanov <[email protected]>
  • Loading branch information
xemul committed Sep 12, 2024
1 parent 93d72e6 commit 21a5b8c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/http/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,29 +313,29 @@ future<> client::do_make_request(request req, reply_handler handle, abort_source
co_await do_make_request(con, req, handle, as, expected);
}), as);
} catch (const std::system_error& ex) {
if (as && as->abort_requested()) {
std::rethrow_exception(as->abort_requested_exception_ptr());
}
if (as && as->abort_requested()) {
std::rethrow_exception(as->abort_requested_exception_ptr());
}

if (!_retry) {
throw;
}
if (!_retry) {
throw;
}

auto code = ex.code().value();
if ((code != EPIPE) && (code != ECONNABORTED)) {
throw;
}
auto code = ex.code().value();
if ((code != EPIPE) && (code != ECONNABORTED)) {
throw;
}

retry_with_new = true;
retry_with_new = true;
}

if (retry_with_new) {
// The 'con' connection may not yet be freed, so the total connection
// count still account for it and with_new_connection() may temporarily
// break the limit. That's OK, the 'con' will be closed really soon
co_await with_new_connection(coroutine::lambda([this, &req, &handle, as, expected] (connection& con) -> future<> {
co_await do_make_request(con, req, handle, as, expected);
}), as);
// The 'con' connection may not yet be freed, so the total connection
// count still account for it and with_new_connection() may temporarily
// break the limit. That's OK, the 'con' will be closed really soon
co_await with_new_connection(coroutine::lambda([this, &req, &handle, as, expected] (connection& con) -> future<> {
co_await do_make_request(con, req, handle, as, expected);
}), as);
}
}

Expand Down

0 comments on commit 21a5b8c

Please sign in to comment.