Skip to content

Commit 76aaea0

Browse files
committed
fix(asio): Fix chat example to print only the message body
1 parent 5db32cc commit 76aaea0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/asio/examples/asio_chat/main/server.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class chat_session
120120
asio::buffer(read_msg_.body(), read_msg_.body_length()),
121121
[this, self](std::error_code ec, std::size_t /*length*/) {
122122
if (!ec) {
123-
ESP_LOGD("asio-chat:", "%s", read_msg_.body());
123+
ESP_LOGD("asio-chat", "%.*s", read_msg_.body_length(), read_msg_.body());
124124
room_.deliver(read_msg_);
125125
do_read_header();
126126
} else {

0 commit comments

Comments
 (0)