make surer config file is written on shutdown

This commit is contained in:
tastytea 2018-06-06 21:17:10 +02:00
parent 42d1898ce3
commit f5a8f04d73
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (expandurl-mastodon
VERSION 0.9.4
VERSION 0.9.5
LANGUAGES CXX
)

View File

@ -66,11 +66,6 @@ Listener::Listener()
Listener::~Listener()
{
if (!configfile.write())
{
syslog(LOG_ERR, "Could not write %s.",
configfile.get_filepath().c_str());
}
}
const void Listener::read_config()
@ -122,6 +117,12 @@ const void Listener::start()
const void Listener::stop()
{
if (!configfile.write())
{
syslog(LOG_ERR, "Could not write %s.",
configfile.get_filepath().c_str());
}
if (_ptr)
{
_ptr->cancel_stream();