We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b050b1 commit f5f2c50Copy full SHA for f5f2c50
src/Internal/ContextClusterWorker.php
@@ -109,7 +109,16 @@ public function run(): void
109
};
110
}
111
112
- $this->joinFuture->await(new TimeoutCancellation(ClusterWatcher::WORKER_TIMEOUT));
+ try {
113
+ $result = $this->joinFuture->await(new TimeoutCancellation(ClusterWatcher::WORKER_TIMEOUT));
114
+ } catch (CancelledException) {
115
+ $this->close();
116
+ // Give it a second to reap the result. Generally this never should time out, unless something is seriously broken.
117
+ $result = $this->joinFuture->await(new TimeoutCancellation(1));
118
+ }
119
+ if ($result instanceof \Throwable) {
120
+ throw $result;
121
122
} catch (\Throwable $exception) {
123
$this->joinFuture->ignore();
124
throw $exception;
0 commit comments