mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 06:31:11 +01:00
ForceFull on startAndLoop
This commit is contained in:
parent
2a5f79e073
commit
a779c75826
@ -140,6 +140,13 @@ class API extends InternalDoc
|
||||
*/
|
||||
private bool $destructing = false;
|
||||
|
||||
/**
|
||||
* Whether we need a full instance.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private bool $forceFull = false;
|
||||
|
||||
/**
|
||||
* API wrapper (to avoid circular references).
|
||||
*
|
||||
@ -249,9 +256,9 @@ class API extends InternalDoc
|
||||
protected function connectToMadelineProto(SettingsAbstract $settings, bool $forceFull = false): \Generator
|
||||
{
|
||||
if ($settings instanceof SettingsIpc) {
|
||||
$forceFull = $forceFull || $settings->getSlow();
|
||||
$forceFull = $forceFull || $this->forceFull || $settings->getSlow();
|
||||
} elseif ($settings instanceof Settings) {
|
||||
$forceFull = $forceFull || $settings->getIpc()->getSlow();
|
||||
$forceFull = $forceFull || $this->forceFull || $settings->getIpc()->getSlow();
|
||||
}
|
||||
|
||||
[$unserialized, $this->unlock] = yield Tools::timeoutWithDefault(
|
||||
@ -416,6 +423,7 @@ class API extends InternalDoc
|
||||
{
|
||||
$errors = [];
|
||||
$this->async(true);
|
||||
$this->forceFull = true;
|
||||
|
||||
if (!yield from $this->reconnectFull()) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user