aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index e0083bff7..917d89457 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -398,6 +398,9 @@ int mpd_main(int argc, char *argv[])
return EXIT_FAILURE;
}
+ main_task = g_thread_self();
+ main_loop = new EventLoop(EventLoop::Default());
+
success = listen_global_init(&error);
if (!success) {
g_warning("%s", error->message);
@@ -407,9 +410,6 @@ int mpd_main(int argc, char *argv[])
daemonize_set_user();
- main_task = g_thread_self();
- main_loop = new EventLoop(EventLoop::Default());
-
GlobalEvents::Initialize();
GlobalEvents::Register(GlobalEvents::IDLE, idle_event_emitted);
GlobalEvents::Register(GlobalEvents::SHUTDOWN, shutdown_event_emitted);