make surer config file is written on shutdown

master
tastytea 4 years ago
parent 42d1898ce3
commit f5a8f04d73
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
  1. 2
      CMakeLists.txt
  2. 11
      src/masto.cpp

@ -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…
Cancel
Save