diff options
author | Gordon Sim <gsim@apache.org> | 2008-11-10 16:48:01 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2008-11-10 16:48:01 +0000 |
commit | 23dac5548075ceae8e85799db4b43359682ae50c (patch) | |
tree | 291e6c4b109520f1280a08296a73aca0c4a3b44b /cpp/src/tests/perftest.cpp | |
parent | a45460718695bbb69fc2b69a740a3e32fc0c1d31 (diff) | |
download | qpid-python-23dac5548075ceae8e85799db4b43359682ae50c.tar.gz |
* don't call exit after catching exception on any particular thread as the other threads may still be running and this causes core dumps
* catch any errors that occur in shutdown
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@712691 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/perftest.cpp')
-rw-r--r-- | cpp/src/tests/perftest.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/tests/perftest.cpp b/cpp/src/tests/perftest.cpp index eb7235a09b..751a5f6288 100644 --- a/cpp/src/tests/perftest.cpp +++ b/cpp/src/tests/perftest.cpp @@ -226,8 +226,12 @@ struct Client : public Runnable { } ~Client() { - session.close(); - connection.close(); + try { + session.close(); + connection.close(); + } catch (const std::exception& e) { + std::cerr << "Error in shutdown: " << e.what() << std::endl; + } } }; @@ -429,7 +433,6 @@ struct Controller : public Client { } catch (const std::exception& e) { cout << "Controller exception: " << e.what() << endl; - exit(1); } } }; @@ -522,7 +525,6 @@ struct PublishThread : public Client { } catch (const std::exception& e) { cout << "PublishThread exception: " << e.what() << endl; - exit(1); } } }; @@ -621,7 +623,6 @@ struct SubscribeThread : public Client { } catch (const std::exception& e) { cout << "SubscribeThread exception: " << e.what() << endl; - exit(1); } } }; |