mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Added Async Task crash warning
This commit is contained in:
parent
f37e79b611
commit
5bf5014b60
@ -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"]."()");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user