summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/server.cc8
-rw-r--r--src/lib/server.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/server.cc b/src/lib/server.cc
index 1fb3d7d47..722b1c811 100644
--- a/src/lib/server.cc
+++ b/src/lib/server.cc
@@ -40,7 +40,7 @@ Server::~Server ()
}
_acceptor.close ();
- _io_service.stop ();
+ stop ();
}
void
@@ -74,3 +74,9 @@ Server::handle_accept (shared_ptr<Socket> socket, boost::system::error_code cons
handle (socket);
start_accept ();
}
+
+void
+Server::stop ()
+{
+ _io_service.stop ();
+}
diff --git a/src/lib/server.h b/src/lib/server.h
index a72d36026..747c516a2 100644
--- a/src/lib/server.h
+++ b/src/lib/server.h
@@ -35,6 +35,7 @@ public:
virtual ~Server ();
virtual void run ();
+ void stop ();
protected:
boost::mutex _mutex;