Only add masters that were resolved to a valid IP address

This commit is contained in:
smallmodel 2025-04-27 19:58:06 +02:00
parent 6faf22d9d9
commit 63bea5156a
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -495,9 +495,10 @@ static int do_connect_multi()
for(i = 0; i < MasterMaxCount; i++) { for(i = 0; i < MasterMaxCount; i++) {
struct sockaddr_in hbaddr; struct sockaddr_in hbaddr;
get_sockaddrin(qr_get_master_host(i), qr_get_master_port(i), &hbaddr, NULL); if (get_sockaddrin(qr_get_master_host(i), qr_get_master_port(i), &hbaddr, NULL)) {
// Valid, add it
add_master(&hbaddr); add_master(&hbaddr);
}
} }
return 0; return 0;