From 93b6645050eb548d9b839c3108d1ad40b14c4b3e Mon Sep 17 00:00:00 2001 From: qicosmos Date: Tue, 16 Jan 2024 17:06:35 +0800 Subject: [PATCH] clean some code (#495) --- include/cinatra/coro_http_connection.hpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/include/cinatra/coro_http_connection.hpp b/include/cinatra/coro_http_connection.hpp index c8e575d4..87aacfed 100644 --- a/include/cinatra/coro_http_connection.hpp +++ b/include/cinatra/coro_http_connection.hpp @@ -348,25 +348,6 @@ class coro_http_connection co_return true; } - async_simple::coro::Lazy write_chunked_data(std::string_view buf, - bool eof) { - std::vector buffers; - to_chunked_buffers(buffers, buf, eof); - auto [ec, _] = co_await async_write(std::move(buffers)); - if (ec) { - CINATRA_LOG_ERROR << "async_write error: " << ec.message(); - close(); - co_return false; - } - - if (!keep_alive_) { - // now in io thread, so can close socket immediately. - close(); - } - - co_return true; - } - bool sync_reply() { return async_simple::coro::syncAwait(reply()); } async_simple::coro::Lazy begin_chunked() {