summaryrefslogtreecommitdiff
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-10-28 15:09:00 +0100
committerMax Kellermann <max@musicpd.org>2020-10-28 15:29:47 +0100
commit3562a3e51eba3c5f1f0b555ddc4fa6c47ec18a9a (patch)
tree92e145b8abee0ca08ff499a69b6a0e5e36e68ab9 /src/Main.cxx
parentbbfa6fe632747c7243b60ccf5d9652de793594a3 (diff)
Main: save the state_file on shutdown
This got lost in commit 5d597a3646cc (v0.21.19), but it was never noticed because the state_file_interval was way too short due to commit 3413d1bf23a, fixed recently by commit 27cc7b352d5
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index c96dac4b7..8405b6fce 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -533,6 +533,9 @@ MainConfigured(const struct options &options, const ConfigData &raw_config)
/* cleanup */
+ if (instance.state_file)
+ instance.state_file->Write();
+
instance.BeginShutdownUpdate();
ZeroconfDeinit();