core: register G_TYPE_SOCKET early

Concurrent registrations later on can cause a deadlock due to a GLib bug.

https://bugzilla.gnome.org/show_bug.cgi?id=754795
This commit is contained in:
Lubomir Rintel
2015-09-08 16:50:53 +02:00
parent 2b129cd8da
commit 9a88d72fd4

View File

@@ -257,6 +257,12 @@ main (int argc, char *argv[])
nm_g_type_init ();
/* Known to cause a possible deadlock unpon GDBus initialization:
* https://bugzilla.gnome.org/show_bug.cgi?id=674885 */
g_type_ensure (G_TYPE_SOCKET);
g_type_ensure (G_TYPE_DBUS_CONNECTION);
g_type_ensure (NM_TYPE_BUS_MANAGER);
_nm_utils_is_manager_process = TRUE;
main_loop = g_main_loop_new (NULL, FALSE);