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