From 8c39d84bf5df9597ad188e11ded8fbe765854b76 Mon Sep 17 00:00:00 2001 From: Alex Badea Date: Mon, 12 Sep 2005 22:52:01 +0000 Subject: [PATCH] Author: Alex Badea Log message: Fixed autoreconnect not working with certain combinations of FEAT_CONNECTFREQUENCY and Class connectfreq. This may require further testing. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1483 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 5 +++++ ircd/ircd.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f927cd4..72f90da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-13 Alex Badea + + * ircd/ircd.c (try_connections): modify autoreconnect logic to + allow FEAT_CONNECTFREQUENCY to be smaller than Class connectfreq + 2005-09-13 Alex Badea * ircd/s_conf.c (close_mappings): NULL out GlobalServiceMapList, diff --git a/ircd/ircd.c b/ircd/ircd.c index b1f87b7..3ef0cdd 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -269,14 +269,14 @@ static void try_connections(struct Event* ev) { || ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe))) continue; + /* Do we need to postpone this connection further? */ + hold = aconf->hold > CurrentTime; + /* Update next possible connection check time. */ - if (next > aconf->hold || next == 0) + if (hold && (next > aconf->hold || next == 0)) next = aconf->hold; - /* Update the next time we can consider this entry. */ cltmp = aconf->conn_class; - hold = aconf->hold > CurrentTime; /* before we update aconf->hold */ - aconf->hold = ConFreq(cltmp) ? CurrentTime + ConFreq(cltmp) : 0; /* Do not try to connect if its use is still on hold until future, * too many links in its connection class, it is already linked, -- 2.20.1