diff --git a/src/pocketmine/network/mcpe/NetworkSession.php b/src/pocketmine/network/mcpe/NetworkSession.php index eda42eee1..c87e7cb30 100644 --- a/src/pocketmine/network/mcpe/NetworkSession.php +++ b/src/pocketmine/network/mcpe/NetworkSession.php @@ -342,7 +342,6 @@ class NetworkSession{ } $this->interface->close($this, $notify ? $reason : ""); - $this->disconnectCleanup(); } /** @@ -355,18 +354,9 @@ class NetworkSession{ if($this->connected){ $this->connected = false; $this->player->close($this->player->getLeaveMessage(), $reason); - $this->disconnectCleanup(); } } - private function disconnectCleanup() : void{ - $this->handler = null; - $this->interface = null; - $this->player = null; - $this->sendBuffer = null; - $this->compressedQueue = null; - } - public function enableEncryption(string $encryptionKey, string $handshakeJwt) : void{ $pk = new ServerToClientHandshakePacket(); $pk->jwt = $handshakeJwt;