From ed942100ec42ef6bb931fcd548cb827e11abcec3 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 15 Oct 2014 17:49:08 +0200 Subject: [PATCH] Do not block when killing workers --- src/pocketmine/PocketMine.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 587569ec8..7fae18e1e 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -477,14 +477,14 @@ namespace pocketmine { $logger->debug("Stopping " . (new \ReflectionClass($thread))->getShortName() . " thread"); if($thread instanceof Thread){ $thread->kill(); - - if($thread->isRunning() or !$thread->join()){ + sleep(1); + if($thread->isRunning()){ $thread->detach(); } }elseif($thread instanceof Worker){ $thread->kill(); sleep(1); - if($thread->isRunning() or !$thread->join()){ + if($thread->isRunning()){ $thread->detach(); } }