From: Carl Hetherington Date: Sat, 6 Aug 2022 20:36:21 +0000 (+0200) Subject: Cleanup: set job state to cancelled in a different place. X-Git-Tag: v2.16.20~8 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=1d3085c403f265fb203654d461c0b77974205f2f Cleanup: set job state to cancelled in a different place. --- diff --git a/src/lib/job.cc b/src/lib/job.cc index 50dcc336e..5bed3f0d2 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -199,9 +199,7 @@ Job::run_wrapper () set_state (FINISHED_ERROR); } catch (boost::thread_interrupted &) { - - set_state (FINISHED_CANCELLED); - + /* The job was cancelled; there's nothing else we need to do here */ } catch (sub::SubripError& e) { string extra = "Error is near:\n"; @@ -601,6 +599,8 @@ Job::cancel () _thread.interrupt (); _thread.join (); + + set_state (FINISHED_CANCELLED); }