summaryrefslogtreecommitdiff
path: root/src/lib/server_finder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-03-16 22:25:57 +0000
committerCarl Hetherington <cth@carlh.net>2015-03-16 22:25:57 +0000
commit1b0b9e4b951e305d47bb011fc4e198472bb3fecf (patch)
tree715db098b0a716a0ee3d46aa060fecadcffc1766 /src/lib/server_finder.cc
parentc416bee48d5a5829077c844c5f2b802bf13ab4cd (diff)
Hand-apply 33b76b675d747fd828aba91d9d857227cb8a8244 from master; make sure signals are disconnected in the right places.
Diffstat (limited to 'src/lib/server_finder.cc')
-rw-r--r--src/lib/server_finder.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/server_finder.cc b/src/lib/server_finder.cc
index bef00702f..d62531d9f 100644
--- a/src/lib/server_finder.cc
+++ b/src/lib/server_finder.cc
@@ -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*