Merge pull request #299 from ludv1x/METR-22224

Fixed race condition during dictionaries' config file update. [See discussion in ST!]
This commit is contained in:
alexey-milovidov 2016-12-30 22:51:38 +04:00 committed by GitHub
commit 220c7f2b93

View File

@ -210,11 +210,11 @@ void ExternalDictionaries::reloadFromFile(const std::string & config_path, const
const auto last_modified = config_file.getLastModified();
if (last_modified > config_last_modified)
{
Poco::AutoPtr<Poco::Util::XMLConfiguration> config = new Poco::Util::XMLConfiguration(config_path);
/// definitions of dictionaries may have changed, recreate all of them
config_last_modified = last_modified;
Poco::AutoPtr<Poco::Util::XMLConfiguration> config = new Poco::Util::XMLConfiguration(config_path);
/// get all dictionaries' definitions
Poco::Util::AbstractConfiguration::Keys keys;
config->keys(keys);