diff --git a/src/Instance.hxx b/src/Instance.hxx index cd05c75f2..4378dc18e 100644 --- a/src/Instance.hxx +++ b/src/Instance.hxx @@ -97,9 +97,9 @@ struct Instance final ~Instance() noexcept; /** - * Initiate shutdown. Wrapper for EventLoop::Break(). + * Wrapper for EventLoop::Break(). Call to initiate shutdown. */ - void Shutdown() { + void Break() { event_loop.Break(); } diff --git a/src/Main.cxx b/src/Main.cxx index 9a4a0ec8a..5f151f5ab 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -747,7 +747,7 @@ JNIEXPORT void JNICALL Java_org_musicpd_Bridge_shutdown(JNIEnv *, jclass) { if (instance != nullptr) - instance->Shutdown(); + instance->Break(); } #endif diff --git a/src/client/ClientRead.cxx b/src/client/ClientRead.cxx index 20547d3c0..0ea79174e 100644 --- a/src/client/ClientRead.cxx +++ b/src/client/ClientRead.cxx @@ -52,7 +52,7 @@ Client::OnSocketInput(void *data, size_t length) noexcept break; case CommandResult::KILL: - partition->instance.Shutdown(); + partition->instance.Break(); Close(); return InputResult::CLOSED; diff --git a/src/win32/Win32Main.cxx b/src/win32/Win32Main.cxx index e26846321..6475509b0 100644 --- a/src/win32/Win32Main.cxx +++ b/src/win32/Win32Main.cxx @@ -71,7 +71,7 @@ service_dispatcher(gcc_unused DWORD control, gcc_unused DWORD event_type, switch (control) { case SERVICE_CONTROL_SHUTDOWN: case SERVICE_CONTROL_STOP: - instance->Shutdown(); + instance->Break(); return NO_ERROR; default: return NO_ERROR; @@ -107,7 +107,7 @@ console_handler(DWORD event) // regardless our thread is still active. // If this did not happen within 3 seconds // let's shutdown anyway. - instance->Shutdown(); + instance->Break(); // Under debugger it's better to wait indefinitely // to allow debugging of shutdown code. Sleep(IsDebuggerPresent() ? INFINITE : 3000);