Allow + in DCP names for ISDCF RU rating strings.
[dcpomatic.git] / src / lib / server.cc
index 5640843a03daa8e23c827e64868aa0536d406831..722b1c81130bde8a81856526c3ad01c357153f3e 100644 (file)
@@ -34,10 +34,13 @@ 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 ();
+       stop ();
 }
 
 void
@@ -71,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 ();
+}