diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-07-03 20:36:20 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-07-03 20:36:20 +0100 |
| commit | 8862cbbb7e857c90d405069ad7d41a8d58029194 (patch) | |
| tree | ebce1a0209f05784f96321be82236d28b647e37a /src/lib/encode_server_finder.cc | |
| parent | a4c5a9ff48c4cec51e3488f4f8692bf2a2f82dca (diff) | |
Remove several exception-throwing asserts from destructors.
Diffstat (limited to 'src/lib/encode_server_finder.cc')
| -rw-r--r-- | src/lib/encode_server_finder.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/encode_server_finder.cc b/src/lib/encode_server_finder.cc index 7491d9ef7..eebf404fa 100644 --- a/src/lib/encode_server_finder.cc +++ b/src/lib/encode_server_finder.cc @@ -64,14 +64,22 @@ EncodeServerFinder::~EncodeServerFinder () _search_condition.notify_all (); if (_search_thread) { - DCPOMATIC_ASSERT (_search_thread->joinable ()); - _search_thread->join (); + /* Ideally this would be a DCPOMATIC_ASSERT(_search_thread->joinable()) but we + can't throw exceptions from a destructor. + */ + if (_search_thread->joinable ()) { + _search_thread->join (); + } } _listen_io_service.stop (); if (_listen_thread) { - DCPOMATIC_ASSERT (_listen_thread->joinable ()); - _listen_thread->join (); + /* Ideally this would be a DCPOMATIC_ASSERT(_listen_thread->joinable()) but we + can't throw exceptions from a destructor. + */ + if (_listen_thread->joinable ()) { + _listen_thread->join (); + } } } |
