mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Line ending cleanup
This commit is contained in:
parent
aafd36859f
commit
db1b7ec4f2
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -1,5 +1,10 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
*.php text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.properties text eol=lf
|
||||
*.bat text eol=crlf
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
|
@ -29,24 +29,11 @@ require_once("src/common/dependencies.php");
|
||||
require_once("classes/PocketMinecraftServer.class.php");
|
||||
require_once("API/ServerAPI.php");
|
||||
|
||||
while(true){
|
||||
$server = new ServerAPI();
|
||||
if($server->start() !== true){
|
||||
break;
|
||||
}else{
|
||||
console("[INFO] Cleaning up...");
|
||||
hard_unset($server);
|
||||
$excludeList = array("GLOBALS", "_FILES", "_COOKIE", "_POST", "_GET", "excludeList");
|
||||
foreach(get_defined_vars() as $key => $value){
|
||||
if(!in_array($key, $excludeList)){
|
||||
$$key = null;
|
||||
unset($$key);
|
||||
}
|
||||
}
|
||||
$server = null;
|
||||
unset($server);
|
||||
console("[NOTICE] The server is restarting... (".gc_collect_cycles()." cycles collected)", true, true, 0);
|
||||
}
|
||||
$server = new ServerAPI();
|
||||
if($server->start() !== true){
|
||||
//Stop
|
||||
}else{
|
||||
//Restart
|
||||
}
|
||||
|
||||
kill(getmypid());
|
||||
kill(getmypid()); //Fix for segfault
|
Loading…
x
Reference in New Issue
Block a user