diff options
Diffstat (limited to 'remote_worker.py')
| -rwxr-xr-x | remote_worker.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/remote_worker.py b/remote_worker.py index c04ac65..0086c40 100755 --- a/remote_worker.py +++ b/remote_worker.py @@ -83,6 +83,7 @@ def main() -> None: in_file = config.config['code_file'] out_file = config.config['result_file'] + stop_thread = None if config.config['watch_for_cancel']: (thread, stop_thread) = watch_for_cancel() @@ -130,8 +131,9 @@ def main() -> None: stop_thread.set() sys.exit(-1) - stop_thread.set() - thread.join() + if stop_thread is not None: + stop_thread.set() + thread.join() if __name__ == '__main__': |
