Skip to content

Commit

Permalink
Use cancellation on join here too
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Mar 2, 2023
1 parent a072e63 commit 409a8f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Worker/Internal/ContextWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ public function submit(Task $task, ?Cancellation $cancellation = null): Executio
} catch (ChannelException $exception) {
try {
$exception = new WorkerException("The worker exited unexpectedly", 0, $exception);
async($this->context->join(...))
->await(new TimeoutCancellation(self::ERROR_TIMEOUT));
$this->context->join(new TimeoutCancellation(self::ERROR_TIMEOUT));
} catch (CancelledException) {
$this->kill();
} catch (\Throwable $exception) {
Expand Down

0 comments on commit 409a8f2

Please sign in to comment.