# HG changeset patch
# User Mark Doliner <mark@kingant.net>
# Date 1076629899 0
# Node ID b51ed4506180235a813e3cec052c10325fcedab0
# Parent  fabcfd9a7c1c97428d26b7f19def899cfb3f48cf
[gaim-migrate @ 8972]
Fix the autorecon thing the correct way

committer: Tailor Script <tailor@pidgin.im>

diff -r fabcfd9a7c1c -r b51ed4506180 plugins/autorecon.c
--- a/plugins/autorecon.c	Thu Feb 12 23:41:04 2004 +0000
+++ b/plugins/autorecon.c	Thu Feb 12 23:51:39 2004 +0000
@@ -51,8 +51,11 @@
 			info = g_new0(GaimAutoRecon, 1);
 			g_hash_table_insert(hash, account, info);
 			info->delay = INITIAL;
-		} else
+		} else {
 			info->delay = MIN(2 * info->delay, MAXTIME);
+		}
+		if (info->timeout != 0)
+			g_source_remove(info->timeout);
 		info->timeout = g_timeout_add(info->delay, do_signon, account);
 	} else if (info != NULL) {
 		g_hash_table_remove(hash, account);