Skip to content

Commit

Permalink
Checker: Don't access undefined variable when not using metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
F30 committed Oct 5, 2020
1 parent b9f83b9 commit 89cad39
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ctf_gameserver/checker/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,11 @@ def sigterm_handler(_, __):
if master_loop.shutting_down and master_loop.get_running_script_count() == 0:
break

metrics_server_process.terminate()
metrics_collector_process.terminate()
metrics_server_process.join()
metrics_collector_process.join()
if args.metrics_listen is not None:
metrics_server_process.terminate()
metrics_collector_process.terminate()
metrics_server_process.join()
metrics_collector_process.join()

return os.EX_OK

Expand Down

0 comments on commit 89cad39

Please sign in to comment.