Apply fixes from StyleCI
This commit is contained in:
parent
6a70bb7018
commit
2b8987d60e
@ -94,14 +94,14 @@ class MTProto
|
|||||||
$this->connect_to_all_dcs();
|
$this->connect_to_all_dcs();
|
||||||
$this->datacenter->curdc = 2;
|
$this->datacenter->curdc = 2;
|
||||||
if (!isset($this->authorization['bot']) || !$this->authorization['bot']) {
|
if (!isset($this->authorization['bot']) || !$this->authorization['bot']) {
|
||||||
$nearest_dc = $this->method_call('help.getNearestDc', [], ['datacenter' => $this->datacenter->curdc]);
|
$nearest_dc = $this->method_call('help.getNearestDc', [], ['datacenter' => $this->datacenter->curdc]);
|
||||||
\danog\MadelineProto\Logger::log(["We're in ".$nearest_dc['country'].', current dc is '.$nearest_dc['this_dc'].', nearest dc is '.$nearest_dc['nearest_dc'].'.'], Logger::NOTICE);
|
\danog\MadelineProto\Logger::log(["We're in ".$nearest_dc['country'].', current dc is '.$nearest_dc['this_dc'].', nearest dc is '.$nearest_dc['nearest_dc'].'.'], Logger::NOTICE);
|
||||||
|
|
||||||
if ($nearest_dc['nearest_dc'] != $nearest_dc['this_dc']) {
|
if ($nearest_dc['nearest_dc'] != $nearest_dc['this_dc']) {
|
||||||
$this->datacenter->curdc = $nearest_dc['nearest_dc'];
|
$this->datacenter->curdc = $nearest_dc['nearest_dc'];
|
||||||
$this->settings['connection_settings']['default_dc'] = $nearest_dc['nearest_dc'];
|
$this->settings['connection_settings']['default_dc'] = $nearest_dc['nearest_dc'];
|
||||||
$this->should_serialize = true;
|
$this->should_serialize = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->get_config([], ['datacenter' => $this->datacenter->curdc]);
|
$this->get_config([], ['datacenter' => $this->datacenter->curdc]);
|
||||||
$this->v = $this->getV();
|
$this->v = $this->getV();
|
||||||
|
Loading…
Reference in New Issue
Block a user