Skip to content

Commit

Permalink
style: Format coro_http_connection.hpp using clang-format-13
Browse files Browse the repository at this point in the history
  • Loading branch information
xukeawsl committed Sep 21, 2024
1 parent af3d4ba commit 4984d5c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/cinatra/coro_http_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,15 @@ class coro_http_connection
head_buf_.consume(head_buf_.size());
std::span<char> payload{};
auto payload_length = ws_.payload_length();

if (max_part_size_ != 0 && payload_length > max_part_size_) {
std::string close_reason = "message_too_big";
std::string close_msg = ws_.format_close_payload(
close_code::too_big, close_reason.data(), close_reason.size());
co_await write_websocket(close_msg, opcode::close);
close();
result.ec = std::error_code(asio::error::message_size, asio::error::get_system_category());
result.ec = std::error_code(asio::error::message_size,
asio::error::get_system_category());
break;
}

Expand Down

0 comments on commit 4984d5c

Please sign in to comment.