Prevent config reload after initial save.

This commit is contained in:
XMRig 2019-02-15 07:06:48 +07:00
parent f4d2dec628
commit 14e7c82512
6 changed files with 31 additions and 13 deletions

View file

@ -147,6 +147,20 @@ void xmrig::Controller::addListener(IControllerListener *listener)
}
void xmrig::Controller::save()
{
if (!config()) {
return;
}
if (d_ptr->config->isShouldSave()) {
d_ptr->config->save();
}
ConfigLoader::watch(d_ptr->config);
}
void xmrig::Controller::onNewConfig(IConfig *config)
{
Config *previousConfig = d_ptr->config;