mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +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
|
# Auto detect text files and perform LF normalization
|
||||||
* text=auto
|
* 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
|
# Custom for Visual Studio
|
||||||
*.cs diff=csharp
|
*.cs diff=csharp
|
||||||
|
@ -29,24 +29,11 @@ require_once("src/common/dependencies.php");
|
|||||||
require_once("classes/PocketMinecraftServer.class.php");
|
require_once("classes/PocketMinecraftServer.class.php");
|
||||||
require_once("API/ServerAPI.php");
|
require_once("API/ServerAPI.php");
|
||||||
|
|
||||||
while(true){
|
$server = new ServerAPI();
|
||||||
$server = new ServerAPI();
|
if($server->start() !== true){
|
||||||
if($server->start() !== true){
|
//Stop
|
||||||
break;
|
}else{
|
||||||
}else{
|
//Restart
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kill(getmypid());
|
kill(getmypid()); //Fix for segfault
|
Loading…
x
Reference in New Issue
Block a user