Skip to content

Commit

Permalink
agents: fix grpc insecure opt initialization
Browse files Browse the repository at this point in the history
`OtlpGrpcClientOptions.use_ssl_credentials` is not initialized by
default to `false` as it happens with all their children. Make sure it
is otherwise it can produce undesired behaviour.

PR-URL: #247
Reviewed-By: Rafael Gonzaga <[email protected]>
  • Loading branch information
santigimeno committed Jan 9, 2025
1 parent 4813152 commit c82802a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agents/grpc/src/grpc_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1038,8 +1038,8 @@ int GrpcAgent::config(const json& config) {
opts.endpoint = endpoint;
opts.metadata = {{"nsolid-agent-id", agent_id_},
{"nsolid-saas", saas()}};
opts.use_ssl_credentials = !insecure;
if (!insecure) {
opts.use_ssl_credentials = true;
if (!custom_certs_.empty()) {
opts.ssl_credentials_cacert_as_string = custom_certs_;
} else {
Expand Down

0 comments on commit c82802a

Please sign in to comment.