Skip to content

Commit 477e201

Browse files
committed
agents: fix grpc insecure opt initialization
`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]> PR-URL: #245
1 parent 606c97b commit 477e201

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agents/grpc/src/grpc_agent.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,8 @@ int GrpcAgent::config(const json& config) {
10371037
opts.endpoint = endpoint;
10381038
opts.metadata = {{"nsolid-agent-id", agent_id_},
10391039
{"nsolid-saas", saas()}};
1040+
opts.use_ssl_credentials = !insecure;
10401041
if (!insecure) {
1041-
opts.use_ssl_credentials = true;
10421042
if (!custom_certs_.empty()) {
10431043
opts.ssl_credentials_cacert_as_string = custom_certs_;
10441044
} else {

0 commit comments

Comments
 (0)