Commit 26562bf7 authored by David Auer's avatar David Auer
Browse files

Fix extract_protocol and address lookup in client

parent 5814d237
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -320,7 +320,12 @@ read_random_slicing_get_hosts() {
                make_shared<gkfs::rpc::RandomSlicingDistributor>(dist_impl);
        CTX->distributor(distributor);
        hosts = distributor->get_hosts_map();
        extract_protocol(hosts[0].second);
        // for(const auto& [id, host] : hosts) {
        //     const auto& [hostname, uri] = host;
        //     cout << "host id: " << id << " hostname: " << hostname
        //          << " uri: " << uri << "\n";
        // }
        extract_protocol(hosts.begin()->second.second);
    } catch(const exception& e) {
        auto emsg = fmt::format(
                "Failed to load random slicing configuration: {}", e.what());
@@ -349,7 +354,7 @@ connect_to_hosts(const unordered_map<uint64_t, pair<string, string>>& hosts) {

    std::unordered_map<uint64_t, hermes::endpoint> addrs{};

    vector<uint64_t> host_ids(hosts.size());
    vector<uint64_t> host_ids{};
    // populate vector with host ids
    for(const auto& host : hosts) {
        host_ids.push_back(host.first);