Hack around probles when destroying the Server object.
authorCarl Hetherington <cth@carlh.net>
Sun, 23 Sep 2012 13:47:41 +0000 (14:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 23 Sep 2012 13:47:41 +0000 (14:47 +0100)
test/test.cc

index 6d5efa455718eb028058c100400bcecb08f0c383..2a99c862f2fb887caf540f2a26f8d4b40e4a212f 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);
 
-       new thread (boost::bind (&Server::run, &server, 1));
+       new thread (boost::bind (&Server::run, server, 1));
 
        ServerDescription description ("localhost", 1);
        shared_ptr<EncodedData> remotely_encoded = frame.encode_remotely (&description);