Issue "Shutdown complete" message after destructors complete.
This commit is contained in:
+7
-14
@@ -53,8 +53,6 @@ using namespace pipedal;
|
||||
#define AARCH64
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
class application_category : public boost::system::error_category
|
||||
{
|
||||
public:
|
||||
@@ -81,7 +79,6 @@ static bool isJackServiceRunning()
|
||||
return std::filesystem::exists(path);
|
||||
}
|
||||
|
||||
|
||||
static void AsanCheck()
|
||||
{
|
||||
char *t = new char[5];
|
||||
@@ -214,6 +211,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
{
|
||||
{
|
||||
auto locale = Locale::GetInstance();
|
||||
@@ -244,19 +242,16 @@ int main(int argc, char *argv[])
|
||||
throw std::logic_error("pthread_sigmask failed.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
PiPedalModel model;
|
||||
|
||||
|
||||
model.SetNetworkChangedListener(
|
||||
[&server]() mutable {
|
||||
[&server]() mutable
|
||||
{
|
||||
if (server)
|
||||
{
|
||||
server->DisplayIpAddresses();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
model.SetRestartListener(
|
||||
[]()
|
||||
@@ -279,7 +274,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
model.WaitForAudioDeviceToComeOnline();
|
||||
|
||||
|
||||
#if JACK_HOST
|
||||
if (systemd)
|
||||
{
|
||||
@@ -324,10 +318,8 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
server->RunInBackground(-1);
|
||||
|
||||
|
||||
model.StartHotspotMonitoring();
|
||||
|
||||
|
||||
{
|
||||
sigwait(&sigSet, &sig);
|
||||
|
||||
@@ -345,10 +337,11 @@ int main(int argc, char *argv[])
|
||||
Lv2Log::info("Stopping web server.");
|
||||
server->ShutDown(5000);
|
||||
server->Join();
|
||||
|
||||
}
|
||||
Lv2Log::info("Shutdown complete.");
|
||||
|
||||
if (g_restart) return EXIT_FAILURE; // indicate to systemd that we want a restart.
|
||||
if (g_restart)
|
||||
return EXIT_FAILURE; // indicate to systemd that we want a restart.
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user