mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Crash main server thread when RakLib dies
this way we get crashdumps and find out what's actually wrong with RakLib in the wild.
This commit is contained in:
parent
cc230034f9
commit
5d8fa2e126
8
composer.lock
generated
8
composer.lock
generated
@ -413,12 +413,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/RakLib.git",
|
||||
"reference": "8f189b687d39489e422bb30be984a33763f29662"
|
||||
"reference": "2f5dfdaa28ff69d72cd1682faa521e18b17a15ef"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/8f189b687d39489e422bb30be984a33763f29662",
|
||||
"reference": "8f189b687d39489e422bb30be984a33763f29662",
|
||||
"url": "https://api.github.com/repos/pmmp/RakLib/zipball/2f5dfdaa28ff69d72cd1682faa521e18b17a15ef",
|
||||
"reference": "2f5dfdaa28ff69d72cd1682faa521e18b17a15ef",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -446,7 +446,7 @@
|
||||
"source": "https://github.com/pmmp/RakLib/tree/master",
|
||||
"issues": "https://github.com/pmmp/RakLib/issues"
|
||||
},
|
||||
"time": "2019-01-04T15:05:24+00:00"
|
||||
"time": "2019-01-09T18:42:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/snooze",
|
||||
|
@ -103,7 +103,11 @@ class RakLibInterface implements ServerInstance, AdvancedNetworkInterface{
|
||||
|
||||
public function tick() : void{
|
||||
if(!$this->rakLib->isRunning() and !$this->rakLib->isShutdown()){
|
||||
throw new \Exception("RakLib Thread crashed");
|
||||
$e = $this->rakLib->getCrashInfo();
|
||||
if($e !== null){
|
||||
throw $e;
|
||||
}
|
||||
throw new \Exception("RakLib Thread crashed without crash information");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user