Skip to content

Commit

Permalink
Fix race condition between freeing judge and judge selection (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 authored Jun 21, 2020
1 parent f06d796 commit 139dbb6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion judge/bridge/judge_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ def on_ping_response(self, packet):
self._update_ping()

def _free_self(self, packet):
self._working = False
self.judges.on_judge_free(self, packet['submission-id'])

def _ping_thread(self):
Expand Down
1 change: 1 addition & 0 deletions judge/bridge/judge_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def on_judge_free(self, judge, submission):
with self.lock:
logger.info('Judge available after grading %d: %s', submission, judge.name)
del self.submission_map[submission]
judge._working = False
self._handle_free_judge(judge)

def abort(self, submission):
Expand Down

0 comments on commit 139dbb6

Please sign in to comment.