From 0f6f80c7de62402fb635a41ce75b50eba3713320 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 5 Mar 2018 14:58:55 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/Server.php | 3 ++- src/danog/MadelineProto/Server/Handler.php | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/Server.php b/src/danog/MadelineProto/Server.php index f11bc53c..08dc88e1 100644 --- a/src/danog/MadelineProto/Server.php +++ b/src/danog/MadelineProto/Server.php @@ -77,7 +77,8 @@ class Server \danog\MadelineProto\Logger::log("Waiting for $pid"); pcntl_wait($pid); } - \danog\MadelineProto\Logger::log("Done, closing main process"); + \danog\MadelineProto\Logger::log('Done, closing main process'); + return; } } diff --git a/src/danog/MadelineProto/Server/Handler.php b/src/danog/MadelineProto/Server/Handler.php index 383bac26..fd24677c 100644 --- a/src/danog/MadelineProto/Server/Handler.php +++ b/src/danog/MadelineProto/Server/Handler.php @@ -32,7 +32,9 @@ class Handler extends \danog\MadelineProto\Connection $this->protocol = $extra; $this->construct_TL(['socket' => __DIR__.'/../TL_socket.tl']); } - public function __destruct() { + + public function __destruct() + { \danog\MadelineProto\Logger::log('Closing socket in fork '.getmypid()); unset($this->sock); $this->destruct_madeline(); @@ -63,6 +65,7 @@ class Handler extends \danog\MadelineProto\Connection } catch (\danog\MadelineProto\NothingInTheSocketException $e) { continue; } + try { $message = $this->deserialize($message, ['type' => '', 'datacenter' => '']); if ($message['_'] !== 'socketMessageRequest') {