Skip to content

Commit

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

$this->joinFuture->await(new TimeoutCancellation(ClusterWatcher::WORKER_TIMEOUT));
try {
$this->joinFuture->await(new TimeoutCancellation(ClusterWatcher::WORKER_TIMEOUT));
} catch (CancelledException) {
$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));
}
} catch (\Throwable $exception) {
$this->joinFuture->ignore();
throw $exception;
Expand Down

0 comments on commit 9098256

Please sign in to comment.