summaryrefslogtreecommitdiff
path: root/src/lib/server.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-05-25 11:14:30 +0100
committerCarl Hetherington <cth@carlh.net>2017-05-25 11:14:30 +0100
commit970508d98224f0ed6e3b16cd528f49c24d04ff49 (patch)
treee6c70e1010982ce5d515ef4d20fa76b39aef5e0c /src/lib/server.cc
parent10da8c6ef355d86cb3c0859f264d7d649dce4619 (diff)
Another speculative attempt to fix crash on quit.
Diffstat (limited to 'src/lib/server.cc')
-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 ();
}