From 8ef6425b1684a6fa777e350f4058d4c01aa39450 Mon Sep 17 00:00:00 2001 From: Yexeed <32373441+Yexeed@users.noreply.github.com> Date: Mon, 2 Oct 2017 15:32:36 +0300 Subject: [PATCH] Fixed crashing when stopping server If in server.properties option rcon.enable equals TRUE, the server will crash and cant stop cause it cant find kill() method. Now i added it and server never crashing when trying to kill RCON --- src/pocketmine/network/rcon/RCONInstance.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/network/rcon/RCONInstance.php b/src/pocketmine/network/rcon/RCONInstance.php index e9609e5f4..8a67cfb8a 100755 --- a/src/pocketmine/network/rcon/RCONInstance.php +++ b/src/pocketmine/network/rcon/RCONInstance.php @@ -81,6 +81,9 @@ private function readPacket($client, &$size, &$requestID, &$packetType, &$payloa public function close(){ $this->stop = true; } + public function kill(){ + $this->stop = true; + } public function run(){ @@ -184,4 +187,4 @@ public function run(){ public function getThreadName(){ return "RCON"; } -} \ No newline at end of file +}