Skip to content

Commit

Permalink
fix out buf (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Jul 8, 2024
1 parent d324abd commit 1cd307a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions include/ylt/standalone/cinatra/coro_http_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1317,17 +1317,13 @@ class coro_http_client : public std::enable_shared_from_this<coro_http_client> {
if (!body_.empty()) {
body_.clear();
}
if (!out_buf.empty()) {
out_buf_ = out_buf;
}

out_buf_ = out_buf;

std::shared_ptr<int> guard(nullptr, [this](auto) {
if (!req_headers_.empty()) {
req_headers_.clear();
}
if (!out_buf_.empty()) {
out_buf_ = {};
}
});

resp_data data{};
Expand Down

0 comments on commit 1cd307a

Please sign in to comment.