qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject qpid-proton git commit: PROTON-1700: [C++ binding] Eliminate (probably benign) race - This should silence some helgrind warnings from some test runs
Date Wed, 17 Jan 2018 18:51:01 GMT
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 <astitcher@apache.org>
Authored: Wed Jan 17 13:49:36 2018 -0500
Committer: Andrew Stitcher <astitcher@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


Mime
View raw message