Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2018-03-05 14:58:55 +00:00 committed by StyleCI Bot
parent bf5443daa4
commit 0f6f80c7de
2 changed files with 6 additions and 2 deletions

View File

@ -77,7 +77,8 @@ class Server
\danog\MadelineProto\Logger::log("Waiting for $pid"); \danog\MadelineProto\Logger::log("Waiting for $pid");
pcntl_wait($pid); pcntl_wait($pid);
} }
\danog\MadelineProto\Logger::log("Done, closing main process"); \danog\MadelineProto\Logger::log('Done, closing main process');
return; return;
} }
} }

View File

@ -32,7 +32,9 @@ class Handler extends \danog\MadelineProto\Connection
$this->protocol = $extra; $this->protocol = $extra;
$this->construct_TL(['socket' => __DIR__.'/../TL_socket.tl']); $this->construct_TL(['socket' => __DIR__.'/../TL_socket.tl']);
} }
public function __destruct() {
public function __destruct()
{
\danog\MadelineProto\Logger::log('Closing socket in fork '.getmypid()); \danog\MadelineProto\Logger::log('Closing socket in fork '.getmypid());
unset($this->sock); unset($this->sock);
$this->destruct_madeline(); $this->destruct_madeline();
@ -63,6 +65,7 @@ class Handler extends \danog\MadelineProto\Connection
} catch (\danog\MadelineProto\NothingInTheSocketException $e) { } catch (\danog\MadelineProto\NothingInTheSocketException $e) {
continue; continue;
} }
try { try {
$message = $this->deserialize($message, ['type' => '', 'datacenter' => '']); $message = $this->deserialize($message, ['type' => '', 'datacenter' => '']);
if ($message['_'] !== 'socketMessageRequest') { if ($message['_'] !== 'socketMessageRequest') {