mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Fix ServerKiller and make it less useless (#122)
This commit is contained in:
parent
fe348b0a9d
commit
744f5a8384
@ -484,14 +484,14 @@ namespace pocketmine {
|
||||
|
||||
$logger->info("Stopping other threads");
|
||||
|
||||
$killer = new ServerKiller(8);
|
||||
$killer->start();
|
||||
|
||||
foreach(ThreadManager::getInstance()->getAll() as $id => $thread){
|
||||
$logger->debug("Stopping " . $thread->getThreadName() . " thread");
|
||||
$thread->quit();
|
||||
}
|
||||
|
||||
$killer = new ServerKiller(8);
|
||||
$killer->start();
|
||||
|
||||
$logger->shutdown();
|
||||
$logger->join();
|
||||
|
||||
|
@ -32,7 +32,7 @@ class ServerKiller extends Thread{
|
||||
}
|
||||
|
||||
public function run(){
|
||||
$start = time() + 1;
|
||||
$start = time();
|
||||
$this->synchronized(function(){
|
||||
$this->wait($this->time * 1000000);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user