make surer config file is written on shutdown
This commit is contained in:
parent
42d1898ce3
commit
f5a8f04d73
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.7)
|
||||
project (expandurl-mastodon
|
||||
VERSION 0.9.4
|
||||
VERSION 0.9.5
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user