diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-08 15:48:58 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-18 13:46:50 +0200 |
| commit | b0c1482f98c7e00634c1bc3dd801e76ce69907e2 (patch) | |
| tree | 9c634a1b2914d4bf889e171b73c770469415f799 | |
| parent | 617b8cd303b4a96621a207724c55bed1d749b10c (diff) | |
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).
| -rw-r--r-- | src/lib/encode_server_finder.h | 3 | ||||
| -rw-r--r-- | src/tools/dcpomatic_cli.cc | 2 | ||||
| -rw-r--r-- | test/test.cc | 2 |
3 files changed, 3 insertions, 4 deletions
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<EncodeServerDescription> 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 615e9d3bc..3d8c91b26 100644 --- a/test/test.cc +++ b/test/test.cc @@ -161,7 +161,7 @@ struct TestConfig setup_test_config (); capture_ffmpeg_logs(); - EncodeServerFinder::instance()->stop (); + EncodeServerFinder::drop(); signal_manager = new TestSignalManager (); |
