Applied fixes from StyleCI
This commit is contained in:
parent
c51e4cb9d8
commit
5fe5673fb7
|
@ -15,6 +15,6 @@ namespace danog\MadelineProto;
|
||||||
/**
|
/**
|
||||||
* Manages encryption and message frames.
|
* Manages encryption and message frames.
|
||||||
*/
|
*/
|
||||||
class MTProto extends Tools {
|
class MTProto extends Tools
|
||||||
|
{
|
||||||
}
|
}
|
|
@ -176,6 +176,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
|
||||||
$in = $content_related ? 1 : 0;
|
$in = $content_related ? 1 : 0;
|
||||||
$value = $this->seq_no;
|
$value = $this->seq_no;
|
||||||
$this->seq_no += $in;
|
$this->seq_no += $in;
|
||||||
|
|
||||||
return ($value * 2) + $in;
|
return ($value * 2) + $in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +277,9 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
|
||||||
foreach (range(1, $this->settings['max_tries']['query']) as $i) {
|
foreach (range(1, $this->settings['max_tries']['query']) as $i) {
|
||||||
try {
|
try {
|
||||||
$this->send_message($this->tl->serialize_method($method, $args), $this->tl->content_related($method));
|
$this->send_message($this->tl->serialize_method($method, $args), $this->tl->content_related($method));
|
||||||
if ($opts["requires_answer"]) $server_answer = $this->recv_message();
|
if ($opts['requires_answer']) {
|
||||||
|
$server_answer = $this->recv_message();
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->log->log('An error occurred while calling method '.$method.': '.$e->getMessage().' in '.$e->getFile().':'.$e->getLine().'. Recreating connection and retrying to call method...');
|
$this->log->log('An error occurred while calling method '.$method.': '.$e->getMessage().' in '.$e->getFile().':'.$e->getLine().'. Recreating connection and retrying to call method...');
|
||||||
unset($this->sock);
|
unset($this->sock);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user