fix(config): saving config restored

This commit is contained in:
Alexey Kasyanchuk
2018-02-02 20:10:07 +03:00
parent 316072008a
commit fa1512dee5
3 changed files with 16 additions and 4 deletions

View File

@ -544,10 +544,17 @@ setInterval(() => {
if(typeof options !== 'object')
return;
if(typeof options.indexer !== 'undefined')
{
if(options.indexer)
spider.listen(config.spiderPort)
else
spider.close()
}
for(const option in options)
{
console.log('set', option, options[option])
if(config[option])
if(option in config)
config[option] = options[option]
}