Improvements to DC and settings management
This commit is contained in:
parent
cd8abc2b89
commit
5d9982efa4
@ -131,7 +131,7 @@ class API extends APIFactory
|
||||
Logger::$processed_fork = true;
|
||||
}
|
||||
|
||||
return $this->API->__construct($value);
|
||||
return $this->API->__construct(array_replace_recursive($this->API->settings, $value));
|
||||
}
|
||||
|
||||
return $this->API->storage[$name] = $value;
|
||||
|
@ -45,17 +45,6 @@ class DataCenter
|
||||
}
|
||||
}
|
||||
|
||||
public function dc_disconnect($dc_number)
|
||||
{
|
||||
if ($this->curdc === $dc_number) {
|
||||
$this->curdc = 0;
|
||||
}
|
||||
if (isset($this->sockets[$dc_number])) {
|
||||
\danog\MadelineProto\Logger::log(sprintf(\danog\MadelineProto\Lang::$current_lang['dc_con_stop'], $dc_number), \danog\MadelineProto\Logger::VERBOSE);
|
||||
unset($this->sockets[$dc_number]);
|
||||
}
|
||||
}
|
||||
|
||||
public function dc_connect($dc_number)
|
||||
{
|
||||
if (isset($this->sockets[$dc_number]) && !isset($this->sockets[$dc_number]->old)) {
|
||||
|
Loading…
Reference in New Issue
Block a user