Server::~Server ()
{
- boost::mutex::scoped_lock lm (_mutex);
- _terminate = true;
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _terminate = true;
+ }
+
_acceptor.close ();
- _io_service.stop ();
+ stop ();
}
void
handle (socket);
start_accept ();
}
+
+void
+Server::stop ()
+{
+ _io_service.stop ();
+}