From 3562a3e51eba3c5f1f0b555ddc4fa6c47ec18a9a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 28 Oct 2020 15:09:00 +0100 Subject: [PATCH] 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 --- NEWS | 1 + src/Main.cxx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index a654ef87a..9654176d5 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ver 0.22.2 (not yet released) * database - simple: purge songs and virtual directories for unavailable plugins on update +* state_file: save on shutdown ver 0.22.1 (2020/10/17) * decoder 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();