diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-01-26 18:36:30 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-01-26 18:36:30 (GMT) |
commit | 256f9df327d13447ec110bbaebe813b86e57a610 (patch) | |
tree | da58c29d58b3695406fc323ebc54483c0978d536 /Swiften/QA/NetworkTest/BoostConnectionServerTest.cpp | |
parent | c27c75917aea053baaa884638a3c056666a05602 (diff) | |
download | swift-contrib-256f9df327d13447ec110bbaebe813b86e57a610.zip swift-contrib-256f9df327d13447ec110bbaebe813b86e57a610.tar.bz2 |
Make boost io_service a shared object.
This should avoid problems when destroying an event loop containing
timer or network events, after the network factory (and io_service
object) has disappeared (i.e. at shutdown).
Diffstat (limited to 'Swiften/QA/NetworkTest/BoostConnectionServerTest.cpp')
-rw-r--r-- | Swiften/QA/NetworkTest/BoostConnectionServerTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/QA/NetworkTest/BoostConnectionServerTest.cpp b/Swiften/QA/NetworkTest/BoostConnectionServerTest.cpp index 4c38576..57e7a5a 100644 --- a/Swiften/QA/NetworkTest/BoostConnectionServerTest.cpp +++ b/Swiften/QA/NetworkTest/BoostConnectionServerTest.cpp @@ -39,15 +39,15 @@ class BoostConnectionServerTest : public CppUnit::TestFixture { } void testConstructor_TwoServersOnSamePort() { - BoostConnectionServer::ref testling(BoostConnectionServer::create(9999, &boostIOServiceThread_->getIOService(), eventLoop_)); - BoostConnectionServer::ref testling2(BoostConnectionServer::create(9999, &boostIOServiceThread_->getIOService(), eventLoop_)); + BoostConnectionServer::ref testling(BoostConnectionServer::create(9999, boostIOServiceThread_->getIOService(), eventLoop_)); + BoostConnectionServer::ref testling2(BoostConnectionServer::create(9999, boostIOServiceThread_->getIOService(), eventLoop_)); } void testStart_Conflict() { - BoostConnectionServer::ref testling(BoostConnectionServer::create(9999, &boostIOServiceThread_->getIOService(), eventLoop_)); + BoostConnectionServer::ref testling(BoostConnectionServer::create(9999, boostIOServiceThread_->getIOService(), eventLoop_)); testling->start(); - BoostConnectionServer::ref testling2(BoostConnectionServer::create(9999, &boostIOServiceThread_->getIOService(), eventLoop_)); + BoostConnectionServer::ref testling2(BoostConnectionServer::create(9999, boostIOServiceThread_->getIOService(), eventLoop_)); testling2->onStopped.connect( boost::bind(&BoostConnectionServerTest::handleStopped, this, _1)); @@ -55,12 +55,12 @@ class BoostConnectionServerTest : public CppUnit::TestFixture { } void testStop() { - BoostConnectionServer::ref testling(BoostConnectionServer::create(9999, &boostIOServiceThread_->getIOService(), eventLoop_)); + BoostConnectionServer::ref testling(BoostConnectionServer::create(9999, boostIOServiceThread_->getIOService(), eventLoop_)); testling->start(); testling->stop(); - BoostConnectionServer::ref testling2(BoostConnectionServer::create(9999, &boostIOServiceThread_->getIOService(), eventLoop_)); + BoostConnectionServer::ref testling2(BoostConnectionServer::create(9999, boostIOServiceThread_->getIOService(), eventLoop_)); testling2->start(); testling2->stop(); |