# HG changeset patch # Parent df91b36c77f44e1598f34fe14beff27aa4731073 diff -r df91b36c77f4 include/s_bsd.h --- a/include/s_bsd.h Sun Jul 14 22:22:08 2013 +0100 +++ b/include/s_bsd.h Sun Jul 14 22:24:05 2013 +0100 @@ -69,5 +69,6 @@ extern void close_connections(int close_stderr); extern int init_connection_limits(void); extern void update_write(struct Client* cptr); +extern void reset_connection_timer(); #endif /* INCLUDED_s_bsd_h */ diff -r df91b36c77f4 ircd/ircd.c --- a/ircd/ircd.c Sun Jul 14 22:22:08 2013 +0100 +++ b/ircd/ircd.c Sun Jul 14 22:24:05 2013 +0100 @@ -316,6 +316,10 @@ timer_add(&connect_timer, try_connections, 0, TT_ABSOLUTE, next); } +void reset_connection_timer() { + Debug((DEBUG_NOTICE, "reset_connect_timer: Next connection check : %s", myctime(CurrentTime + feature_int(FEAT_HANGONRETRYDELAY) + 1))); + timer_chg(&connect_timer, TT_ABSOLUTE, CurrentTime + feature_int(FEAT_HANGONRETRYDELAY) + 1); +} /** Check for clients that have not sent a ping response recently. * Reschedules itself to run again at the appropriate time. diff -r df91b36c77f4 ircd/s_bsd.c --- a/ircd/s_bsd.c Sun Jul 14 22:22:08 2013 +0100 +++ b/ircd/s_bsd.c Sun Jul 14 22:24:05 2013 +0100 @@ -392,6 +392,9 @@ feature_int(FEAT_HANGONRETRYDELAY) : ConfConFreq(aconf)); /* if (nextconnect > aconf->hold) */ /* nextconnect = aconf->hold; */ + #ifdef DEBUGMODE + reset_connection_timer(); + #endif } } else if (IsUser(cptr)) { @@ -403,6 +406,16 @@ else ServerStats->is_ni++; + #ifdef DEBUGMODE + if (IsServerPort(cptr) || IsHandshake(cptr)) { + if ((aconf = find_conf_exact(cli_name(cptr), cptr, CONF_SERVER))) { + /* update aconf->hold for a failed connection (so as not to spam reconnect's */ + aconf->hold = CurrentTime + ConfConFreq(aconf); + } + reset_connection_timer(); + } + #endif + if (-1 < cli_fd(cptr)) { flush_connections(cptr); LocalClientArray[cli_fd(cptr)] = 0;