diff --git a/app/flatpak-main.c b/app/flatpak-main.c index 983345644..9e74bb445 100644 --- a/app/flatpak-main.c +++ b/app/flatpak-main.c @@ -596,6 +596,9 @@ main (int argc, g_set_prgname (argv[0]); + /* Avoid weird recursive type initialization deadlocks from libsoup */ + g_type_ensure (G_TYPE_SOCKET); + /* avoid gvfs (http://bugzilla.gnome.org/show_bug.cgi?id=526454) */ old_env = g_strdup (g_getenv ("GIO_USE_VFS")); g_setenv ("GIO_USE_VFS", "local", TRUE); diff --git a/common/flatpak-installation.c b/common/flatpak-installation.c index a8368fd3b..42374635c 100644 --- a/common/flatpak-installation.c +++ b/common/flatpak-installation.c @@ -129,6 +129,8 @@ flatpak_installation_class_init (FlatpakInstallationClass *klass) object_class->set_property = flatpak_installation_set_property; object_class->finalize = flatpak_installation_finalize; + /* Avoid weird recursive type initialization deadlocks from libsoup */ + g_type_ensure (G_TYPE_SOCKET); } static void diff --git a/tests/httpcache.c b/tests/httpcache.c index 3c4e94731..eb747b354 100644 --- a/tests/httpcache.c +++ b/tests/httpcache.c @@ -8,6 +8,9 @@ main (int argc, char *argv[]) const char *url, *dest; int flags = 0; + /* Avoid weird recursive type initialization deadlocks from libsoup */ + g_type_ensure (G_TYPE_SOCKET); + if (argc == 3) { url = argv[1];