mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 21:51:34 +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();
|
$db = $this->settings->getDb();
|
||||||
if ($db instanceof Memory && $db->getCleanup()) {
|
if ($db instanceof Memory && $db->getCleanup()) {
|
||||||
$this->cleanup();
|
Tools::wait($this->cleanup());
|
||||||
}
|
}
|
||||||
$res = [
|
$res = [
|
||||||
// Databases
|
// Databases
|
||||||
@ -689,9 +689,9 @@ class MTProto extends AsyncConstruct implements TLCallback
|
|||||||
/**
|
/**
|
||||||
* Cleanup memory and session file.
|
* Cleanup memory and session file.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return \Generator
|
||||||
*/
|
*/
|
||||||
public function cleanup(): void
|
public function cleanup(): \Generator
|
||||||
{
|
{
|
||||||
$this->referenceDatabase = new ReferenceDatabase($this);
|
$this->referenceDatabase = new ReferenceDatabase($this);
|
||||||
yield from $this->referenceDatabase->init();
|
yield from $this->referenceDatabase->init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user