I don't understand why.
if (!server.isStopping())
        {
            bool has_host = std::find(listen_hosts.begin(), listen_hosts.end(), server.getListenHost()) != listen_hosts.end();
            bool has_port = !config.getString(server.getPortName(), "").empty();
            if (!has_host || !has_port || config.getInt(server.getPortName()) != server.portNumber())
            {
                server.stop();
                LOG_INFO(log, "Stopped listening for {}", server.getDescription());
            }
        }
    createServers(config, listen_hosts, listen_try, server_pool, async_metrics, servers,  true);
    
    while (std::any_of(servers.begin(), servers.end(), [](const auto & server) { return server.isStopping(); }))
    {
        std::this_thread::sleep_for(std::chrono::milliseconds(100));
        std::erase_if(servers, [&log](auto & server)
        {
            if (!server.isStopping())
                return false;
            auto is_finished = server.currentConnections() == 0;
            if (is_finished)
                LOG_DEBUG(log, "Server finished: {}", server.getDescription());
            else
                LOG_TRACE(log, "Waiting server to finish: {}", server.getDescription());
            return is_finished;
        });
    }
}
}