From 1cd307a950fbaa0a52351fbf3ff270dd6b834910 Mon Sep 17 00:00:00 2001 From: qicosmos Date: Mon, 8 Jul 2024 17:28:49 +0800 Subject: [PATCH] fix out buf (#713) --- include/ylt/standalone/cinatra/coro_http_client.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/ylt/standalone/cinatra/coro_http_client.hpp b/include/ylt/standalone/cinatra/coro_http_client.hpp index 02c0ddc63..67c81782d 100644 --- a/include/ylt/standalone/cinatra/coro_http_client.hpp +++ b/include/ylt/standalone/cinatra/coro_http_client.hpp @@ -1317,17 +1317,13 @@ class coro_http_client : public std::enable_shared_from_this { if (!body_.empty()) { body_.clear(); } - if (!out_buf.empty()) { - out_buf_ = out_buf; - } + + out_buf_ = out_buf; std::shared_ptr guard(nullptr, [this](auto) { if (!req_headers_.empty()) { req_headers_.clear(); } - if (!out_buf_.empty()) { - out_buf_ = {}; - } }); resp_data data{};