Skip to content

Commit

Permalink
Slight improvement to error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nwalters512 committed Nov 25, 2021
1 parent 9978841 commit e2cdbe1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/externalGraderLocal.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ class Grader {

const timeoutId = setTimeout(() => {
logger.info('Timeout exceeded; killing container');
container.kill();
// We don't actually need to wait for the container to be killed
// here - the `container.wait()` below will handle that.
container.kill().catch((err) => logger.error('Failed to kill Docker container', err));
results.timedOut = true;
}, timeout * 1000);

Expand Down

0 comments on commit e2cdbe1

Please sign in to comment.