# HG changeset patch # User Richard Laager # Date 1210408041 0 # Node ID d6fba8b5579493ea7f762d33c2f49ef06d8a1061 # Parent b8f861d7b5409a522d299898dc8190c8ac6c7774 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. diff -r b8f861d7b540 -r d6fba8b55794 pidgin/gtkconn.c --- 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; }