Tidy up to use one list of servers.
[dcpomatic.git] / src / lib / j2k_encoder.cc
index 3d1df688c2d718cc2da9a4b2a0c8e00a3a4d6b33..e62e708cc608492c9a832821e0c632c1b6cec26a 100644 (file)
@@ -412,7 +412,11 @@ J2KEncoder::servers_list_changed ()
                }
        }
 
-       BOOST_FOREACH (EncodeServerDescription i, EncodeServerFinder::instance()->servers ()) {
+       BOOST_FOREACH (EncodeServerDescription i, EncodeServerFinder::instance()->servers()) {
+               if (!i.current_link_version()) {
+                       continue;
+               }
+
                LOG_GENERAL (N_("Adding %1 worker threads for remote %2"), i.threads(), i.host_name ());
                for (int j = 0; j < i.threads(); ++j) {
                        _threads.push_back (new boost::thread (boost::bind (&J2KEncoder::encoder_thread, this, i)));