mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
sugracane & cactus fixed, fixed sigsegv too early
This commit is contained in:
parent
b52e050f8c
commit
2ad06e202f
3 changed files with 14 additions and 12 deletions
|
|
@ -194,12 +194,11 @@ class PocketMinecraftServer{
|
|||
console("[WARNING] Can't keep up! Is the server overloaded?");
|
||||
}
|
||||
}
|
||||
|
||||
private static $_tmp;
|
||||
/**
|
||||
* @param string $reason
|
||||
*/
|
||||
public function close($reason = "server stop"){
|
||||
usleep(2);
|
||||
$this->onShutdown();
|
||||
if($this->stop !== true){
|
||||
if(is_int($reason)){
|
||||
|
|
@ -208,13 +207,12 @@ class PocketMinecraftServer{
|
|||
if(($this->api instanceof ServerAPI) === true){
|
||||
if(($this->api->chat instanceof ChatAPI) === true){
|
||||
$this->api->chat->send(false, "Stopping server...");
|
||||
new StopMessageThread($this, "[INFO] Stopping server..."); //broadcast didnt want to send message to discord for some reason
|
||||
self::$_tmp = new StopMessageThread($this, "[INFO] Stopping server..."); //broadcast didnt want to send message to discord for some reason
|
||||
}
|
||||
}
|
||||
$this->stop = true;
|
||||
$this->trigger("server.close", $reason);
|
||||
$this->interface->close();
|
||||
|
||||
if(!defined("NO_THREADS")){
|
||||
$this->asyncThread->synchronized(function ($t){
|
||||
$t->stop = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue