diff options
Diffstat (limited to 'cpp/src/qpid/sys')
| -rw-r--r-- | cpp/src/qpid/sys/ClusterSafe.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/src/qpid/sys/ClusterSafe.cpp b/cpp/src/qpid/sys/ClusterSafe.cpp index e051591afd..6105fc96c7 100644 --- a/cpp/src/qpid/sys/ClusterSafe.cpp +++ b/cpp/src/qpid/sys/ClusterSafe.cpp @@ -43,8 +43,15 @@ void assertClusterSafe() { } } -ClusterSafeScope::ClusterSafeScope() { inContext = true; } -ClusterSafeScope::~ClusterSafeScope() { inContext = false; } +ClusterSafeScope::ClusterSafeScope() { + assert(!inContext); + inContext = true; +} + +ClusterSafeScope::~ClusterSafeScope() { + assert(inContext); + inContext = false; +} void enableClusterSafe() { inCluster = true; } |
