Skip to content

Commit 409a8f2

Browse files
committed
Use cancellation on join here too
1 parent a072e63 commit 409a8f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Worker/Internal/ContextWorker.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ public function submit(Task $task, ?Cancellation $cancellation = null): Executio
149149
} catch (ChannelException $exception) {
150150
try {
151151
$exception = new WorkerException("The worker exited unexpectedly", 0, $exception);
152-
async($this->context->join(...))
153-
->await(new TimeoutCancellation(self::ERROR_TIMEOUT));
152+
$this->context->join(new TimeoutCancellation(self::ERROR_TIMEOUT));
154153
} catch (CancelledException) {
155154
$this->kill();
156155
} catch (\Throwable $exception) {

0 commit comments

Comments
 (0)