Update source/src/commands/list.cpp
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 44s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m14s

This commit is contained in:
Your Name
2025-08-30 09:20:00 +12:00
parent 764ea2b03c
commit 113c506566

View File

@@ -103,7 +103,6 @@ void list_servers() {
// First, check which servers are online (with caching per server, not per user)
std::map<std::string, bool> server_online_status;
std::mutex online_status_mutex;
transwarp::parallel exec{server_user_pairs.size()};
auto task = transwarp::for_each(exec, server_user_pairs.begin(), server_user_pairs.end(), [&](const server_user_pair& sup) {
@@ -122,7 +121,6 @@ void list_servers() {
// Check if server is online (with caching to avoid redundant checks for multiple users)
bool is_online = false;
{
std::lock_guard<std::mutex> lock(online_status_mutex);
auto it = server_online_status.find(sup.server.get_server_name());
if (it != server_online_status.end()) {
is_online = it->second;
@@ -158,11 +156,10 @@ void list_servers() {
{
std::lock_guard<std::mutex> lock(tp_mutex);
tp.add_row({sup.server.get_server_name(), address_display, sup.user.user, serviceticks, ports_used_str});
++checked;
}
// print out a tick character for each server checked.
info << checked << "" << std::flush;
}
});
task->wait();
info << std::endl << std::endl;