summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2010-12-03 11:44:17 (GMT)
committerJonny Lamb <jonny.lamb@collabora.co.uk>2010-12-03 11:44:17 (GMT)
commite52ed524f5316370fc5630f90dfac2d32d1a65ed (patch)
tree394550ba4d39ccdf3a206849040288c5cc625b8a
parent6c5b65287d27f4bc0f351d886402c959231a57fb (diff)
downloadtelepathy-haze-e52ed524f5316370fc5630f90dfac2d32d1a65ed.tar.gz
telepathy-haze-e52ed524f5316370fc5630f90dfac2d32d1a65ed.tar.xz
connection: be sure to call finish_shutdown if we never connected
This just took me so long to hunt down. :-( Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--src/connection.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/connection.c b/src/connection.c
index 9e76c2a..949b45f 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -507,11 +507,19 @@ _haze_connection_shut_down (TpBaseConnection *base)
{
HazeConnection *self = HAZE_CONNECTION(base);
HazeConnectionPrivate *priv = self->priv;
+
if(!priv->disconnecting && priv->connect_called)
- {
+ {
priv->disconnecting = TRUE;
purple_account_disconnect(self->account);
- }
+ }
+ else if (!priv->connect_called)
+ {
+ /* purple_account_connect was never actually called, so we
+ * won't get to disconnected_cb and so finish_shutdown won't
+ * be called unless we call it here. */
+ tp_base_connection_finish_shutdown (base);
+ }
}
static gchar*