mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Only add masters that were resolved to a valid IP address
This commit is contained in:
parent
6faf22d9d9
commit
63bea5156a
1 changed files with 4 additions and 3 deletions
|
@ -495,9 +495,10 @@ static int do_connect_multi()
|
|||
|
||||
for(i = 0; i < MasterMaxCount; i++) {
|
||||
struct sockaddr_in hbaddr;
|
||||
get_sockaddrin(qr_get_master_host(i), qr_get_master_port(i), &hbaddr, NULL);
|
||||
|
||||
add_master(&hbaddr);
|
||||
if (get_sockaddrin(qr_get_master_host(i), qr_get_master_port(i), &hbaddr, NULL)) {
|
||||
// Valid, add it
|
||||
add_master(&hbaddr);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue