g_object_notify (G_OBJECT (store), "online");
- return camel_service_connect_sync (
- service, cancellable, error);
+ if (camel_service_get_connection_status (service) == CAMEL_SERVICE_CONNECTING)
+ return TRUE;
+
+ return camel_service_connect_sync (service, cancellable, error);
}
/* network available -> network unavailable */
CAMEL_STORE (store), FALSE, cancellable, NULL);
}
- success = camel_service_disconnect_sync (
- service, network_available, cancellable, error);
+ if (camel_service_get_connection_status (service) == CAMEL_SERVICE_DISCONNECTING)
+ success = TRUE;
+ else
+ success = camel_service_disconnect_sync (service, network_available, cancellable, error);
store->priv->online = online;