Probably-missing lock.
authorCarl Hetherington <cth@carlh.net>
Sun, 25 Jan 2015 22:49:13 +0000 (22:49 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 25 Jan 2015 22:49:13 +0000 (22:49 +0000)
src/lib/server_finder.cc

index 35ce9e1a16e8686b51cae35f34783a6ef459946a..ffc2d42dfb783c2f09197fac1ee0f47d4aa62a83 100644 (file)
@@ -136,7 +136,10 @@ try
                string const ip = socket.remote_endpoint().address().to_string ();
                if (!server_found (ip)) {
                        ServerDescription sd (ip, xml->number_child<int> ("Threads"));
-                       _servers.push_back (sd);
+                       {
+                               boost::mutex::scoped_lock lm (_mutex);
+                               _servers.push_back (sd);
+                       }
                        ui_signaller->emit (boost::bind (boost::ref (ServerFound), sd));
                }
        }