You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2018/01/17 18:51:01 UTC

qpid-proton git commit: PROTON-1700: [C++ binding] Eliminate (probably benign) race - This should silence some helgrind warnings from some test runs

Repository: qpid-proton
Updated Branches:
  refs/heads/master d59119308 -> 7888d43d3


PROTON-1700: [C++ binding] Eliminate (probably benign) race
- This should silence some helgrind warnings from some test runs


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

Branch: refs/heads/master
Commit: 7888d43d342a98577d67befde055fd5e8b4d37e1
Parents: d591193
Author: Andrew Stitcher <as...@apache.org>
Authored: Wed Jan 17 13:49:36 2018 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Wed Jan 17 13:49:36 2018 -0500

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/proactor_container_impl.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/7888d43d/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 729c41c..57327f6 100644
--- a/proton-c/bindings/cpp/src/proactor_container_impl.cpp
+++ b/proton-c/bindings/cpp/src/proactor_container_impl.cpp
@@ -285,8 +285,10 @@ bool container::impl::setup_reconnect(pn_connection_t* pnc) {
     // - we pretend to have set up a reconnect attempt so
     //   that the proactor disconnect will finish and we will exit
     //   the run loop without error.
-    if (stopping_) return true;
-
+    {
+        GUARD(lock_);
+        if (stopping_) return true;
+    }
     connection_context& cc = connection_context::get(pnc);
     reconnect_context* rc = cc.reconnect_context_.get();
 


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