Commit befd6690 authored by Max Kellermann's avatar Max Kellermann

Instance: rename Shutdown() to Break()

parent b6013a92
......@@ -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();
}
......
......@@ -747,7 +747,7 @@ JNIEXPORT void JNICALL
Java_org_musicpd_Bridge_shutdown(JNIEnv *, jclass)
{
if (instance != nullptr)
instance->Shutdown();
instance->Break();
}
#endif
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment