This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
     new 7c593ce  PROTON-2406: Replace uses of deprecated 
reconnect_options::failover_urls with connection_options
7c593ce is described below

commit 7c593cecb270760af7a05f854fed8078819fd4af
Author: Rakhi Kumari <rakhi.c...@gmail.com>
AuthorDate: Mon Oct 25 15:39:23 2021 +0530

    PROTON-2406: Replace uses of deprecated reconnect_options::failover_urls 
with connection_options
---
 cpp/examples/reconnect_client.cpp         | 4 +---
 cpp/include/proton/connection_options.hpp | 7 +++++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/cpp/examples/reconnect_client.cpp 
b/cpp/examples/reconnect_client.cpp
index 5ec0e01..753295c 100644
--- a/cpp/examples/reconnect_client.cpp
+++ b/cpp/examples/reconnect_client.cpp
@@ -54,10 +54,8 @@ class reconnect_client : public proton::messaging_handler {
   private:
     void on_container_start(proton::container &c) override {
         proton::connection_options co;
-        proton::reconnect_options ro;
 
-        ro.failover_urls(failovers);
-        co.reconnect(ro);
+        co.failover_urls(failovers);
         c.connect(url, co);
     }
 
diff --git a/cpp/include/proton/connection_options.hpp 
b/cpp/include/proton/connection_options.hpp
index a4d35d5..c96cbe7 100644
--- a/cpp/include/proton/connection_options.hpp
+++ b/cpp/include/proton/connection_options.hpp
@@ -197,6 +197,13 @@ class connection_options {
     /// If the connection to the primary connection url fails then try each of 
the fail-over
     /// connection urls in turn.
     ///
+    /// If this option is set then it will by default set the default 
reconnect timing options.
+    ///
+    /// If this option is changed using @ref connection::update_options before 
a reconnection
+    /// attempt (for example in the @ref messaging_handler::on_transport_error 
callback) then
+    /// the new values of the failover urls will be used for the reconnect 
attempt rather then
+    /// any previous value.
+    ///
     /// If both the failover_urls and reconnect_url options are set then the 
behavior is not defined.
     PN_CPP_EXTERN connection_options& failover_urls(const 
std::vector<std::string>&);
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to