Merge pull request #51 from danog/patch-1

Enable async right away
This commit is contained in:
Alexander Pankratov 2020-10-06 23:40:48 +03:00 committed by GitHub
commit dd38e2b021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;