diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-08-10 00:00:38 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-08-10 00:00:38 +0100 |
commit | 4230221725b0cd0f6a9b84f726759d20ff9f0e62 (patch) | |
tree | a97bed5677ebe2bf7aaa1f999be0bed3a4f809a4 /protocols/nogaim.c | |
parent | 280e655722c8660ec2dff9b08f82b10d5559bfd9 (diff) |
Added ceiling to auto-reconnect delay, changed the default to 5*3<900 and
added documentation.
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r-- | protocols/nogaim.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c index eb3fc2ad..b6f8d6e4 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -293,6 +293,7 @@ void imc_logout( struct im_connection *ic, int allow_reconnect ) irc_t *irc = ic->irc; user_t *t, *u; account_t *a; + int delay; /* Nested calls might happen sometimes, this is probably the best place to catch them. */ @@ -332,10 +333,9 @@ void imc_logout( struct im_connection *ic, int allow_reconnect ) /* Uhm... This is very sick. */ } else if( allow_reconnect && set_getbool( &irc->set, "auto_reconnect" ) && - set_getbool( &a->set, "auto_reconnect" ) ) + set_getbool( &a->set, "auto_reconnect" ) && + ( delay = account_reconnect_delay( a ) ) > 0 ) { - int delay = account_reconnect_delay( a ); - imcb_log( ic, "Reconnecting in %d seconds..", delay ); a->reconnect = b_timeout_add( delay * 1000, auto_reconnect, a ); } |