P2PServer: prefer DNS TXT records to load seed nodes

This commit is contained in:
SChernykh
2023-05-10 21:22:51 +02:00
parent 689fa14cfd
commit db9e5ba332
4 changed files with 117 additions and 6 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ void TCPServer::parse_address_list_internal(const std::string& address_list, Cal
}
}
const int port = atoi(address.substr(k2 + 1).c_str());
const int port = strtol(address.substr(k2 + 1).c_str(), nullptr, 10);
if ((port > 0) && (port < 65536)) {
callback(is_v6, address, ip, port);
}