From 554c674ca6ba5d3d285f6763a67fee0e73bdf65f Mon Sep 17 00:00:00 2001 From: Dylan Brasseur Date: Wed, 11 Oct 2023 14:03:00 +0200 Subject: [PATCH] Added retry channel --- ArmoniK.SDK.Client/src/ChannelPool.cpp | 7 +++++-- tools/common.sh | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ArmoniK.SDK.Client/src/ChannelPool.cpp b/ArmoniK.SDK.Client/src/ChannelPool.cpp index c04fd68..8b2ce07 100644 --- a/ArmoniK.SDK.Client/src/ChannelPool.cpp +++ b/ArmoniK.SDK.Client/src/ChannelPool.cpp @@ -1,6 +1,7 @@ #include "ChannelPool.h" #include +#include #include #include @@ -27,14 +28,16 @@ std::shared_ptr ChannelPool::AcquireChannel() { return channel; } } - std::string endpoint(properties_.configuration.get_control_plane().getEndpoint()); auto scheme_delim = endpoint.find("://"); if (scheme_delim != std::string::npos) { endpoint = endpoint.substr(scheme_delim + 3); } // TODO Handle TLS/mTLS - channel = grpc::CreateChannel(endpoint, grpc::InsecureChannelCredentials()); + channel = grpc::CreateCustomChannel( + endpoint, grpc::InsecureChannelCredentials(), + armonik::api::common::utils::getChannelArguments( + static_cast(properties_.configuration))); logger_.log(armonik::api::common::logger::Level::Debug, "Created and acquired new channel from pool"); return channel; } diff --git a/tools/common.sh b/tools/common.sh index 7ec2dc6..ce199b7 100644 --- a/tools/common.sh +++ b/tools/common.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash # shellcheck disable=SC2034 -ARMONIK_API_VERSION_DEFAULT="3.13.1" +ARMONIK_API_VERSION_DEFAULT="3.13.2" ARMONIK_SDK_VERSION_DEFAULT="0.1.0-local"