--- a/libpurple/connection.c Thu Oct 03 02:15:31 2013 +0530 +++ b/libpurple/connection.c Thu Oct 03 06:47:52 2013 +0530 @@ -720,9 +720,6 @@ purple_protocol_class_close(priv->protocol, gc); - purple_http_conn_cancel_all(gc); - purple_proxy_connect_cancel_with_handle(gc); - /* Clear out the proto data that was freed in the protocol's close method */ buddies = purple_blist_find_buddies(account, NULL); while (buddies != NULL) { @@ -731,6 +728,9 @@ buddies = g_slist_delete_link(buddies, buddies); } + purple_http_conn_cancel_all(gc); + purple_proxy_connect_cancel_with_handle(gc); + connections = g_list_remove(connections, gc); purple_connection_set_state(gc, PURPLE_CONNECTION_DISCONNECTED);