From b39db1dfa350038a154daf79df45e0a54d812be6 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 6 Oct 2020 22:38:12 +0200 Subject: [PATCH] Enable async right away unsetEventHandler will be callForked internally anyway --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index cfd07e0..044b842 100644 --- a/src/Client.php +++ b/src/Client.php @@ -70,10 +70,10 @@ class Client Files::getSessionSettings($session), ); $instance = new MadelineProto\API($file, $settings); + $instance->async(true); if (self::isSessionLoggedIn($instance)) { $instance->unsetEventHandler(); } - $instance->async(true); $this->instances[$session] = $instance; return $instance;