Skip to content

Commit

Permalink
clean some code (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Jan 16, 2024
1 parent 3448ac0 commit 93b6645
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions include/cinatra/coro_http_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,25 +348,6 @@ class coro_http_connection
co_return true;
}

async_simple::coro::Lazy<bool> write_chunked_data(std::string_view buf,
bool eof) {
std::vector<asio::const_buffer> 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<bool> begin_chunked() {
Expand Down

0 comments on commit 93b6645

Please sign in to comment.