Skip to content

Commit f08710e

Browse files
committed
Report ExitFailures from cluster worker exits
1 parent 0b050b1 commit f08710e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Internal/ContextClusterWorker.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ public function run(): void
109109
};
110110
}
111111

112-
$this->joinFuture->await(new TimeoutCancellation(ClusterWatcher::WORKER_TIMEOUT));
112+
try {
113+
$this->joinFuture->await(new TimeoutCancellation(ClusterWatcher::WORKER_TIMEOUT));
114+
} catch (CancelledException $e) {
115+
$this->close();
116+
// Give it a second to reap the result. Generally this never should time out, unless something is seriously broken.
117+
$this->joinFuture->await(new TimeoutCancellation(1));
118+
throw $e;
119+
}
113120
} catch (\Throwable $exception) {
114121
$this->joinFuture->ignore();
115122
throw $exception;

0 commit comments

Comments
 (0)