Hack around destruction problems in test.
authorCarl Hetherington <cth@carlh.net>
Sun, 23 Sep 2012 15:08:18 +0000 (16:08 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 23 Sep 2012 15:08:18 +0000 (16:08 +0100)
test/test.cc

index 06954822d68c5a47214c2b8903dd201007de7761..45d681be086d5115123437861c1200e9de4f88ba 100644 (file)
@@ -287,9 +287,9 @@ BOOST_AUTO_TEST_CASE (client_server_test)
        shared_ptr<EncodedData> locally_encoded = frame.encode_locally ();
        
        Config::instance()->set_server_port (61920);
-       Server server (&log);
+       Server* server = new Server (&log);
 
-       thread t (boost::bind (&Server::run, &server, 1));
+       thread t (boost::bind (&Server::run, server, 1));
 
        ServerDescription description ("localhost", 1);
        shared_ptr<EncodedData> remotely_encoded = frame.encode_remotely (&description);