Skip to content

Commit

Permalink
fix(asio): Fix chat example to print only the message body
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Jan 24, 2025
1 parent 4bce72d commit d4c3eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/asio/examples/asio_chat/main/server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class chat_session
asio::buffer(read_msg_.body(), read_msg_.body_length()),
[this, self](std::error_code ec, std::size_t /*length*/) {
if (!ec) {
ESP_LOGD("asio-chat:", "%s", read_msg_.body());
ESP_LOGD("asio-chat", "%.*s", read_msg_.body_length(), read_msg_.body());
room_.deliver(read_msg_);
do_read_header();
} else {
Expand Down

0 comments on commit d4c3eb9

Please sign in to comment.