From 117c2155f54e713b073a541f8f4d1a8659a6fbfd Mon Sep 17 00:00:00 2001 From: Rahman Abber Tahir Date: Mon, 4 Dec 2023 10:32:14 +0100 Subject: [PATCH] added some comments to mention default timeout to close descDb stream. Signed-off-by: Rahman Abber Tahir --- src/libCli/Call.cpp | 2 +- src/libCli/ConnectionManager.cpp | 2 +- src/libCli/libCli/ConnectionManager.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libCli/Call.cpp b/src/libCli/Call.cpp index c2fc33e..510f059 100644 --- a/src/libCli/Call.cpp +++ b/src/libCli/Call.cpp @@ -192,7 +192,7 @@ namespace cli //before calling the RPC, close the DescDb connection with a default timeout. We still continue with rpc call //but remove the cache file if the stream was not closed gracefully so it fetches the reflection data again next time. - grpc::Status dbDescStatus = ConnectionManager::getInstance().closeDescDbStream(serverAddress); + ConnectionManager::getInstance().closeDescDbStream(serverAddress); grpc::testing::CliCall call(channel, methodStr, clientMetadata, deadline); diff --git a/src/libCli/ConnectionManager.cpp b/src/libCli/ConnectionManager.cpp index 350ef25..3422e9d 100644 --- a/src/libCli/ConnectionManager.cpp +++ b/src/libCli/ConnectionManager.cpp @@ -73,7 +73,7 @@ namespace cli return grpc::Status( grpc::StatusCode::ABORTED, "descDbProxy has not been initialized."); } - //if proxy exists close the stream with a deadline. + //if proxy exists close the stream. grpc::Status status = m_connections[f_serverAddress].descDbProxy->closeDescDbStream(); //delete the proxy, findChannelByAddress() protects from accessing uninitialzed DbProxy. diff --git a/src/libCli/libCli/ConnectionManager.hpp b/src/libCli/libCli/ConnectionManager.hpp index 19e8539..2a48f78 100644 --- a/src/libCli/libCli/ConnectionManager.hpp +++ b/src/libCli/libCli/ConnectionManager.hpp @@ -52,7 +52,7 @@ namespace cli /// @returns the gRpc DescriptorPool of the corresponding server address. std::shared_ptr getDescPool(std::string f_serverAddress, ArgParse::ParsedElement &f_parseTree); - /// @brief closes the DescDb stream with a default deadline. + /// @brief closes the DescDb stream with a default deadline of 2 seconds. /// @param f_serverAddress server addresss to lookup the assigned DescDbProxy. /// @return returns grpc::StatusCode::ABORTED status if no DescDb proxy is attached to the server address, /// otherwise grpc status as a result of stream closure.