Skip to content

Commit

Permalink
Report ExitFailures from cluster worker exits
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoebi committed Dec 21, 2024
1 parent 0b050b1 commit f08710e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Internal/ContextClusterWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ public function run(): void
};
}

$this->joinFuture->await(new TimeoutCancellation(ClusterWatcher::WORKER_TIMEOUT));
try {
$this->joinFuture->await(new TimeoutCancellation(ClusterWatcher::WORKER_TIMEOUT));
} catch (CancelledException $e) {
$this->close();
// Give it a second to reap the result. Generally this never should time out, unless something is seriously broken.
$this->joinFuture->await(new TimeoutCancellation(1));
throw $e;
}
} catch (\Throwable $exception) {
$this->joinFuture->ignore();
throw $exception;
Expand Down

0 comments on commit f08710e

Please sign in to comment.