Skip to content

Commit

Permalink
Fix a case where causedByLostConnection is passed a throwable (#19591)
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid authored and taylorotwell committed Jun 13, 2017
1 parent 8c20b7d commit 7b6172b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Queue/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ protected function getNextJob($connection, $queue)

$this->stopWorkerIfLostConnection($e);
} catch (Throwable $e) {
$this->exceptions->report(new FatalThrowableError($e));
$this->exceptions->report($e = new FatalThrowableError($e));

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

$this->stopWorkerIfLostConnection($e);
} catch (Throwable $e) {
$this->exceptions->report(new FatalThrowableError($e));
$this->exceptions->report($e = new FatalThrowableError($e));

$this->stopWorkerIfLostConnection($e);
}
Expand Down

0 comments on commit 7b6172b

Please sign in to comment.