From: Carl Hetherington Date: Sun, 8 Oct 2023 13:48:58 +0000 (+0200) Subject: Make stop() private and use drop() instead. X-Git-Tag: v2.17.10~25 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=b23b24b5043efd3ea76b9765f25e4c1eef3da989;p=dcpomatic.git Make stop() private and use drop() instead. This avoids confusing situations where we call stop(), then try to restart the finder (unsuccessfully, because once it's stop()ped it will stay around, never to be restarted). --- diff --git a/src/lib/encode_server_finder.h b/src/lib/encode_server_finder.h index f8a30af54..c478387f9 100644 --- a/src/lib/encode_server_finder.h +++ b/src/lib/encode_server_finder.h @@ -50,8 +50,6 @@ public: static EncodeServerFinder* instance (); static void drop (); - void stop (); - std::list servers () const; /** Emitted whenever the list of servers changes */ @@ -62,6 +60,7 @@ private: ~EncodeServerFinder (); void start (); + void stop (); void search_thread (); void listen_thread (); diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc index 96bf83086..2abc3a149 100644 --- a/src/tools/dcpomatic_cli.cc +++ b/src/tools/dcpomatic_cli.cc @@ -413,7 +413,7 @@ main (int argc, char* argv[]) signal_manager = new SignalManager (); if (no_remote || export_format) { - EncodeServerFinder::instance()->stop (); + EncodeServerFinder::drop(); } if (json_port) { diff --git a/test/test.cc b/test/test.cc index 586b87f5a..bf008998a 100644 --- a/test/test.cc +++ b/test/test.cc @@ -163,7 +163,7 @@ struct TestConfig setup_test_config (); capture_ffmpeg_logs(); - EncodeServerFinder::instance()->stop (); + EncodeServerFinder::drop(); signal_manager = new TestSignalManager ();