Skip to content

Commit

Permalink
🐛 FIX: retrieve future exception on_killed (#206)
Browse files Browse the repository at this point in the history
The exception set on the future should be retrieved,
otherwise it will be caught by the loop's exception handler.
  • Loading branch information
chrisjsewell authored Feb 15, 2021
1 parent bf94508 commit d1c5977
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plumpy/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ def on_kill(self, msg: Optional[str]) -> None:
def on_killed(self) -> None:
"""Entered the KILLED state."""
self._killing = None
self.future().exception() # exception must be retrieved
self._fire_event(ProcessListener.on_process_killed, self.killed_msg())

def on_terminated(self) -> None:
Expand Down

0 comments on commit d1c5977

Please sign in to comment.