Write client info after binding keys

This commit is contained in:
Daniil Gentili 2016-11-18 21:27:58 +00:00
parent c39c6a8511
commit 17f0de5e73
2 changed files with 2 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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('<i', fread($bytes_io, 4)) [0];