From 17f0de5e7312d000a2799d66b647b896135269a4 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 18 Nov 2016 21:27:58 +0000 Subject: [PATCH] Write client info after binding keys --- src/danog/MadelineProto/MTProto.php | 2 +- src/danog/MadelineProto/TL/TL.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 47c4ae34..2d538492 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -141,8 +141,8 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB \danog\MadelineProto\Logger::log('Switching to DC '.$new_dc.'...'); if ($this->datacenter->dc_connect($new_dc)) { $this->init_authorization(); - $this->write_client_info($allow_nearest_dc_switch); $this->bind_temp_auth_key($this->settings['authorization']['default_temp_auth_key_expires_in']); + $this->write_client_info($allow_nearest_dc_switch); } } diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index ea90bebd..210fd468 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -176,6 +176,7 @@ class TL extends \danog\MadelineProto\Tools if (!(get_resource_type($bytes_io) == 'file' || get_resource_type($bytes_io) == 'stream')) { throw new Exception('An invalid bytes_io handle was provided.'); } + \danog\MadelineProto\Logger::log('Extracting '.$type.'/'.$subtype.' at byte '.ftell($bytes_io)); switch ($type) { case 'int': $x = \danog\PHP\Struct::unpack('