activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1449155 - /activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/tcp/TcpTransportTest.cpp
Date Fri, 22 Feb 2013 18:16:13 GMT
Author: tabish
Date: Fri Feb 22 18:16:13 2013
New Revision: 1449155

URL: http://svn.apache.org/r1449155
Log:
fix leak in test

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/tcp/TcpTransportTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/tcp/TcpTransportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/tcp/TcpTransportTest.cpp?rev=1449155&r1=1449154&r2=1449155&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/tcp/TcpTransportTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/tcp/TcpTransportTest.cpp
Fri Feb 22 18:16:13 2013
@@ -152,12 +152,17 @@ void TcpTransportTest::setUp() {
 ////////////////////////////////////////////////////////////////////////////////
 void TcpTransportTest::tearDown() {
 
-    if (server == NULL) {
-        return;
+    try {
+        if (server == NULL) {
+            return;
+        }
+
+        server->stop();
+        server->waitUntilStopped();
+        delete server;
+    } catch (...) {
+        delete server;
     }
-
-    server->stop();
-    server->waitUntilStopped();
 }
 
 ////////////////////////////////////////////////////////////////////////////////



Mime
View raw message