summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/tests')
-rw-r--r--cpp/src/tests/SocketProxy.h2
-rw-r--r--cpp/src/tests/exception_test.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/tests/SocketProxy.h b/cpp/src/tests/SocketProxy.h
index 4582dc36fd..0c6f39d62e 100644
--- a/cpp/src/tests/SocketProxy.h
+++ b/cpp/src/tests/SocketProxy.h
@@ -76,7 +76,7 @@ class SocketProxy : private qpid::sys::Runnable
if (closed) { return; }
closed=true;
}
- if (thread.id() != qpid::sys::Thread::current().id()) {
+ if (thread && thread != qpid::sys::Thread::current()) {
thread.join();
joined = true;
}
diff --git a/cpp/src/tests/exception_test.cpp b/cpp/src/tests/exception_test.cpp
index 4dac8ee965..3536ffddbe 100644
--- a/cpp/src/tests/exception_test.cpp
+++ b/cpp/src/tests/exception_test.cpp
@@ -74,7 +74,7 @@ struct Catcher : public Runnable {
}
bool join() {
- if (thread.id()) {
+ if (thread) {
thread.join();
thread=Thread();
}