Skip to content

Commit

Permalink
fix: run callback
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Mar 1, 2024
1 parent da7887e commit c504c23
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/timeout_executor/terminate.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,7 @@ def terminate(process: subprocess.Popen[str], terminator: Terminator) -> None:


def callback(callback_args: CallbackArgs, terminator: Terminator) -> None:
callback_args.process.wait()
terminator.run_callbacks(callback_args, terminator.func_name)
try:
callback_args.process.wait()
finally:
terminator.run_callbacks(callback_args, terminator.func_name)

0 comments on commit c504c23

Please sign in to comment.