Remove configuration of servers.
[dcpomatic.git] / src / lib / server_finder.cc
index 56f52b7fc292d9510d0b77a0264ca68ef8fede41..941caf4d97b3f50e94c8f849b4a0187937b93d3e 100644 (file)
@@ -34,7 +34,8 @@ using boost::scoped_array;
 ServerFinder* ServerFinder::_instance = 0;
 
 ServerFinder::ServerFinder ()
-       : _broadcast_thread (0)
+       : _disabled (false)
+       , _broadcast_thread (0)
        , _listen_thread (0)
 {
        _broadcast_thread = new boost::thread (boost::bind (&ServerFinder::broadcast_thread, this));
@@ -103,6 +104,10 @@ ServerFinder::listen_thread ()
 void
 ServerFinder::connect (boost::function<void (ServerDescription)> fn)
 {
+       if (_disabled) {
+               return;
+       }
+       
        boost::mutex::scoped_lock lm (_mutex);
 
        /* Emit the current list of servers */