diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-12 17:49:55 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-18 12:05:10 +0200 |
commit | d08e6f1af5a96818c9e7c2c9e0a6288470489822 (patch) | |
tree | 3d636565e4cd9001566f842eac09bb6601bfb5ba /src/buildtool/serve_api/remote/configuration_client.cpp | |
parent | ec447408d17c530ce2023d8148dd34a6d8138535 (diff) | |
download | justbuild-d08e6f1af5a96818c9e7c2c9e0a6288470489822.tar.gz |
Pass RemoteAddress to ConfigurationClient by value
...instead of using singleton calls.
Diffstat (limited to 'src/buildtool/serve_api/remote/configuration_client.cpp')
-rw-r--r-- | src/buildtool/serve_api/remote/configuration_client.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/buildtool/serve_api/remote/configuration_client.cpp b/src/buildtool/serve_api/remote/configuration_client.cpp index 7f7bb535..f4276aee 100644 --- a/src/buildtool/serve_api/remote/configuration_client.cpp +++ b/src/buildtool/serve_api/remote/configuration_client.cpp @@ -32,13 +32,6 @@ auto ConfigurationClient::CheckServeRemoteExecution() const noexcept -> bool { "have been set."); return false; } - auto client_serve_address = RemoteServeConfig::Instance().RemoteAddress(); - if (!client_serve_address) { - logger_.Emit( - LogLevel::Error, - "Internal error: the serve endpoint should have been set."); - return false; - } grpc::ClientContext context; justbuild::just_serve::RemoteExecutionEndpointRequest request{}; @@ -63,10 +56,10 @@ auto ConfigurationClient::CheckServeRemoteExecution() const noexcept -> bool { // NOTE: This check might make sense to be removed altogether in the // future, or updated to (at most) a warning. if (client_remote_address->ToJson() == - client_serve_address->ToJson()) { + client_serve_address_.ToJson()) { return true; } - serve_msg = client_serve_address->ToJson().dump(); + serve_msg = client_serve_address_.ToJson().dump(); } else { nlohmann::json serve_remote_endpoint{}; |