Skip to content

Commit 9e8974d

Browse files
feat-193: fixed client_id empty logging
1 parent 980649b commit 9e8974d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/web_video_server.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,10 @@ bool WebVideoServer::handle_shutdown(
294294
}
295295

296296
if (verbose_) {
297+
const std::string client_id_info = client_id.empty() ? "" : " (client_id='" + client_id + "')";
297298
RCLCPP_INFO(
298-
get_logger(), "Shutdown request for topic '%s' (client_id='%s'): stopped %d stream(s)",
299-
topic.c_str(), client_id.c_str(), stopped);
299+
get_logger(), "Shutdown request for topic '%s'%s: stopped %d stream(s)",
300+
topic.c_str(), client_id_info.c_str(), stopped);
300301
}
301302

302303
async_web_server_cpp::HttpReply::builder(async_web_server_cpp::HttpReply::ok)

0 commit comments

Comments
 (0)