move bootstrap logic from DhtRunner to Dht

This commit is contained in:
Adrien Béraud committed 2020-04-24 16:32:07 -04:00
1 parent 7628aab230
commit f30d21e96f
9 files changed
+227 -221

No files matched your search

+1 -4
View File
@@ -76,11 +76,8 @@ SockAddr::resolve(const std::string& host, const std::string& service)
if(rc != 0)
throw std::invalid_argument(std::string("Error: `") + host + ":" + service + "`: " + gai_strerror(rc));
addrinfo* infop = info;
while (infop) {
for (addrinfo* infop = info; infop; infop = infop->ai_next)
ips.emplace_back(infop->ai_addr, infop->ai_addrlen);
infop = infop->ai_next;
}
freeaddrinfo(info);
return ips;
}