You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/09/01 15:04:16 UTC

[48/50] qpid-proton git commit: PROTON-1566: [C++ binding] fix minor thread safety issue in reconnect

PROTON-1566: [C++ binding] fix minor thread safety issue in reconnect


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/35191b8b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/35191b8b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/35191b8b

Branch: refs/heads/go1
Commit: 35191b8b54d31c8e79d6921eb3927c6fc4fb3cda
Parents: 17d2a6f
Author: Alan Conway <ac...@redhat.com>
Authored: Thu Aug 31 17:05:17 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Thu Aug 31 17:05:17 2017 -0400

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/proactor_container_impl.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/35191b8b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/proactor_container_impl.cpp b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
index 7f5edfe..43460db 100644
--- a/proton-c/bindings/cpp/src/proactor_container_impl.cpp
+++ b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
@@ -212,7 +212,9 @@ void container::impl::reconnect(pn_connection_t* pnc) {
 
     cc.connected_address_ = url;
     setup_connection_lh(url, pnc);
-    make_wrapper(pnc).open(*rc->connection_options_);
+    { // Scope required to keep temporary destructor from doing pn_decref() after start_connection()
+        make_wrapper(pnc).open(*rc->connection_options_);
+    }
     start_connection(cc.connected_address_, pnc);
     rc->retries_++;
 }


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