Skip to content

Commit

Permalink
[5.4] Fix for withOverlapping, the scheduled task would not resume (#…
Browse files Browse the repository at this point in the history
…19419)

* Fix for withOverlapping, the scheduled task would not resume if an error occurred. This adds a last resort handler to clean up the mutex bit if the application ended unexpectedly

* Update CallbackEvent.php
  • Loading branch information
tschallacka authored and taylorotwell committed Jun 7, 2017
1 parent 6bcc9b1 commit 2041d09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Console/Scheduling/CallbackEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ public function run(Container $container)
return;
}

register_shutdown_function(function() {
$this->removeMutex();
});

try {
$response = $container->call($this->callback, $this->parameters);
} finally {
Expand Down

0 comments on commit 2041d09

Please sign in to comment.