changeset 22886:d6fba8b55794

Disconnect accounts immediately when we're told the network has disconnected, rather than call the keepalive. This provides immediate feedback that the user is disconnected from the network and speeds reconnection if they're changing to a new network immediately. This should only be a problem if we're being told the network has disconnected when it really is still connected or, for example, if you accidentally unplug your network cable and plug it right back in. (The keepalive method should mean that you'd be re-connected and TCP would re-transmit packets as necessary, where this will cut you off immediately.) Given that other applications follow this model, we should be okay.
author Richard Laager <rlaager@wiktel.com>
date Sat, 10 May 2008 08:27:21 +0000
parents b8f861d7b540
children a85fcc0c0248 1dcaee58734f
files pidgin/gtkconn.c
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconn.c	Sat May 10 08:17:53 2008 +0000
+++ b/pidgin/gtkconn.c	Sat May 10 08:27:21 2008 +0000
@@ -210,15 +210,7 @@
 	while (l) {
 		PurpleAccount *a = (PurpleAccount*)l->data;
 		if (!purple_account_is_disconnected(a)) {
-			gc = purple_account_get_connection(a);
-			if (gc && gc->prpl)
-				prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
-			if (prpl_info) {
-				if (prpl_info->keepalive)
-					prpl_info->keepalive(gc);
-				else
-					purple_account_disconnect(a);
-			}
+			purple_account_disconnect(a);
 		}
 		l = l->next;
 	}