Added Async Task crash warning

This commit is contained in:
Shoghi Cervantes 2015-01-05 00:16:47 +01:00
parent f37e79b611
commit 5bf5014b60
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89

View File

@ -103,6 +103,11 @@ class AsyncPool{
$this->workerUsage[$this->taskWorkers[$task->getTaskId()]]--; $this->workerUsage[$this->taskWorkers[$task->getTaskId()]]--;
unset($this->tasks[$task->getTaskId()]); unset($this->tasks[$task->getTaskId()]);
unset($this->taskWorkers[$task->getTaskId()]); unset($this->taskWorkers[$task->getTaskId()]);
}elseif($task->isTerminated()){
$info = $task->getTerminationInfo();
$this->removeTask($task);
$this->server->getLogger()->critical("Could not execute asynchronous task " . (new \ReflectionClass($task))->getShortName() . ": " . $info["message"]);
$this->server->getLogger()->critical("On ".$info["scope"].", line ".$info["line"] .", ".$info["function"]."()");
} }
} }
} }