aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libindicator/indicator-service-manager.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libindicator/indicator-service-manager.c b/libindicator/indicator-service-manager.c
index 9d56a9f..891f49e 100644
--- a/libindicator/indicator-service-manager.c
+++ b/libindicator/indicator-service-manager.c
@@ -433,6 +433,11 @@ start_service (IndicatorServiceManager * service)
static void
service_proxy_destroyed (DBusGProxy * proxy, gpointer user_data)
{
+ IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data);
+ if (priv->connected) {
+ priv->connected = FALSE;
+ g_signal_emit(G_OBJECT(user_data), signals[CONNECTION_CHANGE], 0, FALSE, TRUE);
+ }
return start_service_again(INDICATOR_SERVICE_MANAGER(user_data));
}
@@ -459,8 +464,6 @@ start_service_again (IndicatorServiceManager * manager)
/* Allow the restarting to be disabled */
if (g_getenv(TIMEOUT_ENV_NAME)) {
- priv->connected = FALSE;
- g_signal_emit(manager, signals[CONNECTION_CHANGE], 0, FALSE, TRUE);
return;
}
@@ -469,10 +472,6 @@ start_service_again (IndicatorServiceManager * manager)
g_idle_add(start_service_again_cb, manager);
} else {
/* Not our first time 'round the block. Let's slow this down. */
- if (priv->connected) {
- priv->connected = FALSE;
- g_signal_emit(manager, signals[CONNECTION_CHANGE], 0, FALSE, TRUE);
- }
if (priv->restart_count > 16)
priv->restart_count = 16; /* Not more than 1024x */
g_timeout_add((1 << priv->restart_count) * TIMEOUT_MULTIPLIER, start_service_again_cb, manager);