diff options
Diffstat (limited to 'cpp/src/tests/qpid_ping.cpp')
-rw-r--r-- | cpp/src/tests/qpid_ping.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/tests/qpid_ping.cpp b/cpp/src/tests/qpid_ping.cpp index e4cbe75b57..ddd70515be 100644 --- a/cpp/src/tests/qpid_ping.cpp +++ b/cpp/src/tests/qpid_ping.cpp @@ -94,6 +94,7 @@ class Ping : public Runnable { ; if (status == WAITING && !opts.quiet) cerr << "Timed out after " << opts.timeout << " seconds." << endl; + if (status != WAITING) thread.join(); return status == SUCCESS; } }; @@ -104,7 +105,7 @@ int main(int argc, char** argv) { opts.parse(argc, argv); Ping ping; ping.start(); - if (!ping.wait()) return 1; + if (!ping.wait()) exit(1); if (!opts.quiet) cout << "Success!" << endl; return 0; } catch (const exception& e) { |