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/Network/BoostConnection.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/Network/BoostConnection.cpp')
-rw-r--r-- | Swiften/Network/BoostConnection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Network/BoostConnection.cpp b/Swiften/Network/BoostConnection.cpp index bba2c07..908585d 100644 --- a/Swiften/Network/BoostConnection.cpp +++ b/Swiften/Network/BoostConnection.cpp @@ -44,8 +44,8 @@ class SharedBuffer { // ----------------------------------------------------------------------------- -BoostConnection::BoostConnection(boost::asio::io_service* ioService, EventLoop* eventLoop) : - eventLoop(eventLoop), socket_(*ioService), readBuffer_(BUFFER_SIZE), writing_(false) { +BoostConnection::BoostConnection(boost::shared_ptr<boost::asio::io_service> ioService, EventLoop* eventLoop) : + eventLoop(eventLoop), ioService(ioService), socket_(*ioService), readBuffer_(BUFFER_SIZE), writing_(false) { } BoostConnection::~BoostConnection() { |