ServerSocket: use the SocketMonitor class

This commit is contained in:
Max Kellermann
2013-01-15 22:50:49 +01:00
parent a0ebd444ad
commit 0dd5f2915a
5 changed files with 40 additions and 56 deletions

View File

@@ -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);