summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/server.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/server.cc b/src/lib/server.cc
index 5640843a0..1fb3d7d47 100644
--- a/src/lib/server.cc
+++ b/src/lib/server.cc
@@ -34,8 +34,11 @@ Server::Server (int port)
Server::~Server ()
{
- boost::mutex::scoped_lock lm (_mutex);
- _terminate = true;
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _terminate = true;
+ }
+
_acceptor.close ();
_io_service.stop ();
}