From f81d061ea95c89a133dd7f95c04d5798fba9614f Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 12 Dec 2020 19:06:45 +0000 Subject: [PATCH] Updated to newest RakLib --- composer.lock | 10 +++++----- src/network/mcpe/raklib/RakLibInterface.php | 1 - src/network/mcpe/raklib/RakLibServer.php | 5 ++++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index a72cda838..75fc95c3f 100644 --- a/composer.lock +++ b/composer.lock @@ -637,12 +637,12 @@ "source": { "type": "git", "url": "https://github.com/pmmp/RakLib.git", - "reference": "a40cf8a90c3081166b555826bc1def8a7a5c5cb9" + "reference": "4272f15bc47941b59e1d597ca544465f4a59725e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/RakLib/zipball/a40cf8a90c3081166b555826bc1def8a7a5c5cb9", - "reference": "a40cf8a90c3081166b555826bc1def8a7a5c5cb9", + "url": "https://api.github.com/repos/pmmp/RakLib/zipball/4272f15bc47941b59e1d597ca544465f4a59725e", + "reference": "4272f15bc47941b59e1d597ca544465f4a59725e", "shasum": "" }, "require": { @@ -654,7 +654,7 @@ "pocketmine/log": "dev-master" }, "require-dev": { - "phpstan/phpstan": "0.12.40", + "phpstan/phpstan": "0.12.59", "phpstan/phpstan-strict-rules": "^0.12.2" }, "type": "library", @@ -672,7 +672,7 @@ "issues": "https://github.com/pmmp/RakLib/issues", "source": "https://github.com/pmmp/RakLib/tree/master" }, - "time": "2020-08-28T22:11:37+00:00" + "time": "2020-12-12T02:09:57+00:00" }, { "name": "pocketmine/snooze", diff --git a/src/network/mcpe/raklib/RakLibInterface.php b/src/network/mcpe/raklib/RakLibInterface.php index 41d6f1176..4a8c16a0c 100644 --- a/src/network/mcpe/raklib/RakLibInterface.php +++ b/src/network/mcpe/raklib/RakLibInterface.php @@ -155,7 +155,6 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{ public function shutdown() : void{ $this->server->getTickSleeper()->removeNotifier($this->sleeper); - $this->interface->shutdown(); $this->rakLib->quit(); } diff --git a/src/network/mcpe/raklib/RakLibServer.php b/src/network/mcpe/raklib/RakLibServer.php index aefac3357..329f0d5c2 100644 --- a/src/network/mcpe/raklib/RakLibServer.php +++ b/src/network/mcpe/raklib/RakLibServer.php @@ -164,7 +164,10 @@ class RakLibServer extends Thread{ $this->ready = true; $this->notify(); }); - $manager->run(); + while(!$this->isKilled){ + $manager->tickProcessor(); + } + $manager->waitShutdown(); $this->cleanShutdown = true; }catch(\Throwable $e){ $this->setCrashInfo($e->getMessage());