mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
move bootstrap logic from DhtRunner to Dht
This commit is contained in:
1 parent
7628aab230
commit
f30d21e96f
9 files changed
+227
-221
No files matched your search
+1
-4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user