speed+++++

This commit is contained in:
Daniil Gentili 2017-01-16 17:01:27 +01:00
parent 7f7bb01e64
commit 9c9b7b3c7d
2 changed files with 3 additions and 3 deletions

View File

@ -48,6 +48,7 @@ trait CallHandler
$this->datacenter->incoming_messages[$this->datacenter->outgoing_messages[$int_message_id]['response']]['content'] = [];
}
} catch (\danog\MadelineProto\Exception $e) {
if ($e->getMessage() == 'I had to recreate the temporary authorization key') continue 2;
\danog\MadelineProto\Logger::log('An error getting response of method '.$method.': '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...');
continue;
}
@ -98,8 +99,7 @@ trait CallHandler
switch ($server_answer['error_code']) {
case 48:
$this->datacenter->temp_auth_key['server_salt'] = $server_answer['new_server_salt'];
throw new \danog\MadelineProto\Exception('New server salt stored, re-executing query');
break;
continue 3;
}
throw new \danog\MadelineProto\RPCErrorException('Received bad_msg_notification: '.$this->bad_msg_error_codes[$server_answer['error_code']], $server_answer['error_code']);
break;

View File

@ -317,7 +317,7 @@ trait UpdateHandler
$cur_state['pts'] = $update['pts'];
$pop_pts = true;
} elseif (isset($update['pts_count'])) {
\danog\MadelineProto\Logger::log('Duplicate update. current pts: '.$cur_state['pts'].' + pts count: '.(isset($update['pts_count']) ? $update['pts_count'] : 0).' = new pts: '.$new_pts.'. update pts: '.$update['pts'].' <= current pts '.$cur_state['pts'].', channel id: '.$channel_id, $update);
\danog\MadelineProto\Logger::log('Duplicate update. current pts: '.$cur_state['pts'].' + pts count: '.(isset($update['pts_count']) ? $update['pts_count'] : 0).' = new pts: '.$new_pts.'. update pts: '.$update['pts'].' <= current pts '.$cur_state['pts'].', channel id: '.$channel_id);
return false;
}