mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 19:11:16 +01:00
Use wait just this once
This commit is contained in:
parent
9511ebab38
commit
ba59131926
@ -615,7 +615,7 @@ class MTProto extends AsyncConstruct implements TLCallback
|
||||
{
|
||||
$db = $this->settings->getDb();
|
||||
if ($db instanceof Memory && $db->getCleanup()) {
|
||||
$this->cleanup();
|
||||
Tools::wait($this->cleanup());
|
||||
}
|
||||
$res = [
|
||||
// Databases
|
||||
@ -689,9 +689,9 @@ class MTProto extends AsyncConstruct implements TLCallback
|
||||
/**
|
||||
* Cleanup memory and session file.
|
||||
*
|
||||
* @return void
|
||||
* @return \Generator
|
||||
*/
|
||||
public function cleanup(): void
|
||||
public function cleanup(): \Generator
|
||||
{
|
||||
$this->referenceDatabase = new ReferenceDatabase($this);
|
||||
yield from $this->referenceDatabase->init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user