mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Fixed thread error capture fail in shutdown function
the shutdown handler currently isn't called until join(), which sets isKilled to true and stops the error information from being recorded.
This commit is contained in:
@ -124,7 +124,7 @@ trait CommonThreadPartsTrait{
|
||||
*/
|
||||
protected function onShutdown() : void{
|
||||
$this->synchronized(function() : void{
|
||||
if(!$this->isKilled && $this->crashInfo === null){
|
||||
if($this->isTerminated() && $this->crashInfo === null){
|
||||
$last = error_get_last();
|
||||
if($last !== null){
|
||||
//fatal error
|
||||
|
Reference in New Issue
Block a user