We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b4a168b + 4e9d199 commit 6bb3630Copy full SHA for 6bb3630
src/daemon/rpc_command_executor.cpp
@@ -644,12 +644,9 @@ bool t_rpc_command_executor::print_connections() {
644
}
645
646
647
- auto longest_host = *std::max_element(res.connections.begin(), res.connections.end(),
648
- [](const auto &info1, const auto &info2)
649
- {
650
- return info1.address.length() < info2.address.length();
651
- });
652
- int host_field_width = std::max(15, 8 + (int) longest_host.address.length());
+ int host_field_width = 15;
+ for (const auto &conn : res.connections)
+ host_field_width = std::max(host_field_width, 8 + (int) conn.address.length());
653
654
tools::msg_writer() << std::setw(host_field_width) << std::left << "Remote Host"
655
<< std::setw(8) << "Type"
0 commit comments