Hand-apply 33b76b675d747fd828aba91d9d857227cb8a8244 from master; make sure signals...
[dcpomatic.git] / src / lib / server_finder.cc
index bef00702f800c8ae7d503304b058d6ee746d6b43..d62531d9f7b634e6534033bb4bd426273ee32d4e 100644 (file)
@@ -192,13 +192,9 @@ ServerFinder::server_found (string ip) const
        return i != _servers.end ();
 }
 
-void
+boost::signals2::connection
 ServerFinder::connect (boost::function<void (ServerDescription)> fn)
 {
-       if (_disabled) {
-               return;
-       }
-       
        boost::mutex::scoped_lock lm (_mutex);
 
        /* Emit the current list of servers */
@@ -206,7 +202,7 @@ ServerFinder::connect (boost::function<void (ServerDescription)> fn)
                fn (*i);
        }
 
-       ServerFound.connect (fn);
+       return ServerFound.connect (fn);
 }
 
 ServerFinder*