1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 04:46:17 +00:00

Reset ID of outgoing server link on DNS error correctly

Not resetting the ID prevents the daemon from trying to re-establish
outgoing server links when the DNS resolver failed to resole a hostname.
This commit is contained in:
Alexander Barton 2010-12-02 13:38:42 +01:00
parent 5da98ec389
commit 60bb40d67a

View File

@ -1968,8 +1968,11 @@ cb_Connect_to_Server(int fd, UNUSED short events)
/* Read result from pipe */
len = Proc_Read(&Conf_Server[i].res_stat, dest_addrs, sizeof(dest_addrs));
if (len == 0)
if (len == 0) {
/* Error resolving hostname: reset server structure */
Conf_Server[i].conn_id = NONE;
return;
}
assert((len % sizeof(ng_ipaddr_t)) == 0);