1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
3 Date: Wed, 13 Oct 2021 17:33:05 +0000
4 Subject: [PATCH] tracker3: Don't create connection in static constructor
6 bus_new will wait for work in the GDBus thread to be completed. However,
7 further type initialization in the GDBus thread will block on the GType
8 class_init_rec_mutex we're already holding and we end up in a deadlock.
10 .../tracker3/rygel-tracker-root-container.vala | 16 ++++++++--------
11 1 file changed, 8 insertions(+), 8 deletions(-)
13 diff --git a/src/plugins/tracker3/rygel-tracker-root-container.vala b/src/plugins/tracker3/rygel-tracker-root-container.vala
14 index c5d3b25a55d6..c7f722a81ce8 100644
15 --- a/src/plugins/tracker3/rygel-tracker-root-container.vala
16 +++ b/src/plugins/tracker3/rygel-tracker-root-container.vala
17 @@ -34,15 +34,15 @@ public class Rygel.Tracker.RootContainer : Rygel.SimpleContainer {
19 public static Sparql.Connection connection;
23 - RootContainer.connection = Sparql.Connection.bus_new (TRACKER_SERVICE, null);
24 - } catch (Error err) {
25 - error ("Failed to connect to tracker: %s", err.message);
29 public RootContainer (string title) {
30 + if (RootContainer.connection == null) {
32 + RootContainer.connection = Sparql.Connection.bus_new (TRACKER_SERVICE, null);
33 + } catch (Error err) {
34 + error ("Failed to connect to tracker: %s", err.message);
40 if (this.get_bool_config_without_error ("share-music")) {