Skip to content

Commit 7b6172b

Browse files
themsaidtaylorotwell
authored andcommitted
Fix a case where causedByLostConnection is passed a throwable (#19591)
1 parent 8c20b7d commit 7b6172b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Queue/Worker.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ protected function getNextJob($connection, $queue)
247247

248248
$this->stopWorkerIfLostConnection($e);
249249
} catch (Throwable $e) {
250-
$this->exceptions->report(new FatalThrowableError($e));
250+
$this->exceptions->report($e = new FatalThrowableError($e));
251251

252252
$this->stopWorkerIfLostConnection($e);
253253
}
@@ -270,7 +270,7 @@ protected function runJob($job, $connectionName, WorkerOptions $options)
270270

271271
$this->stopWorkerIfLostConnection($e);
272272
} catch (Throwable $e) {
273-
$this->exceptions->report(new FatalThrowableError($e));
273+
$this->exceptions->report($e = new FatalThrowableError($e));
274274

275275
$this->stopWorkerIfLostConnection($e);
276276
}

0 commit comments

Comments
 (0)