summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-27 13:28:08 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-27 13:31:45 +0200
commit317f55bb256bd978eb2f10874fcf09ec0f69ac8d (patch)
treef41cbc85763038092149823262287b4b07140364
parent4bd9ac1f66de58ce6943ff8016fc613a53290c4c (diff)
downloadserenity-317f55bb256bd978eb2f10874fcf09ec0f69ac8d.zip
ConfigServer: Update the configuration cache on file changes
We were only notifying clients about the change, but didn't actually update the internal cache in ConfigServer itself. Thanks to "The Grey One" for pointing this out. :^)
-rw-r--r--Userland/Services/ConfigServer/ClientConnection.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Services/ConfigServer/ClientConnection.cpp b/Userland/Services/ConfigServer/ClientConnection.cpp
index 6a2e0194b6..4f5e7b02f4 100644
--- a/Userland/Services/ConfigServer/ClientConnection.cpp
+++ b/Userland/Services/ConfigServer/ClientConnection.cpp
@@ -50,6 +50,8 @@ static Core::ConfigFile& ensure_domain_config(String const& domain)
}
}
}
+ // FIXME: Refactor this whole thing so that we don't need a cache lookup here.
+ s_cache.get(domain).value()->config = new_config;
};
auto cache_entry = make<CachedDomain>(domain, config, watcher_or_error.release_value());
s_cache.set(domain, move(cache_entry));