summaryrefslogtreecommitdiff
path: root/src/lib/encoder.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/encoder.cc
parentc416bee48d5a5829077c844c5f2b802bf13ab4cd (diff)
Hand-apply 33b76b675d747fd828aba91d9d857227cb8a8244 from master; make sure signals are disconnected in the right places.
Diffstat (limited to 'src/lib/encoder.cc')
-rw-r--r--src/lib/encoder.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index 6b520571a..2a6026879 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -93,7 +93,9 @@ Encoder::begin ()
_threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, optional<ServerDescription> ())));
}
- ServerFinder::instance()->connect (boost::bind (&Encoder::server_found, this, _1));
+ if (!ServerFinder::instance()->disabled ()) {
+ _server_found_connection = ServerFinder::instance()->connect (boost::bind (&Encoder::server_found, this, _1));
+ }
}
void