diff --git a/src/danog/MadelineProto/Db/SqlArray.php b/src/danog/MadelineProto/Db/SqlArray.php index 63fc8c08e..26b830811 100644 --- a/src/danog/MadelineProto/Db/SqlArray.php +++ b/src/danog/MadelineProto/Db/SqlArray.php @@ -7,7 +7,6 @@ namespace danog\MadelineProto\Db; use Amp\Sql\Pool; use Amp\Sql\Result; use PDO; -use Webmozart\Assert\Assert; use function serialize; diff --git a/src/danog/MadelineProto/EventHandler.php b/src/danog/MadelineProto/EventHandler.php index 00f8febbf..f45a183cf 100644 --- a/src/danog/MadelineProto/EventHandler.php +++ b/src/danog/MadelineProto/EventHandler.php @@ -26,8 +26,6 @@ use Amp\Sync\LocalMutex; use danog\MadelineProto\Db\DbPropertiesTrait; use Generator; -use function Amp\delay; - /** * Event handler. */ @@ -130,7 +128,8 @@ abstract class EventHandler extends InternalDoc /** * @internal */ - public function waitForStartInternal(): void { + public function waitForStartInternal(): void + { $this->startFuture?->await(); } /** diff --git a/src/danog/MadelineProto/GarbageCollector.php b/src/danog/MadelineProto/GarbageCollector.php index 9041885ac..f5235e561 100644 --- a/src/danog/MadelineProto/GarbageCollector.php +++ b/src/danog/MadelineProto/GarbageCollector.php @@ -47,7 +47,6 @@ final class GarbageCollector return; } self::$started = true; - self::getMemoryConsumption(); EventLoop::repeat(1, static function (): void { $currentMemory = self::getMemoryConsumption();