Do not rely on old data
This commit is contained in:
parent
f64efb021c
commit
e600f91975
@ -272,7 +272,7 @@ class DataCenter
|
||||
}
|
||||
foreach ($ctxs as $ctx) {
|
||||
try {
|
||||
if ($old) {
|
||||
if ($old && $this->sockets[$dc_number]->hasConnection($id)) {
|
||||
$this->API->logger->logger("Reconnecting to DC $dc_number ($id) from existing", \danog\MadelineProto\Logger::WARNING);
|
||||
$this->sockets[$dc_number]->setExtra($this->API);
|
||||
yield $this->sockets[$dc_number]->connect($ctx, $id);
|
||||
|
@ -136,7 +136,7 @@ class Logger
|
||||
$settings['logger']['logger_param'] = Magic::$script_cwd.'/MadelineProto.log';
|
||||
}
|
||||
|
||||
$logger = new self($settings['logger']['logger'], isset($settings['logger']['logger_param']) ? $settings['logger']['logger_param'] : '', $prefix, isset($settings['logger']['logger_level']) ? $settings['logger']['logger_level'] : Logger::VERBOSE, isset($settings['logger']['max_size']) ? $settings['logger']['max_size'] : 100 * 1024 * 1024);
|
||||
$logger = new self($settings['logger']['logger'], $settings['logger']['logger_param'] ?? '', $prefix, $settings['logger']['logger_level'] ?? Logger::VERBOSE, $settings['logger']['max_size'] ?? 100 * 1024 * 1024);
|
||||
if (!self::$default) {
|
||||
self::$default = $logger;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user