Enable async right away

unsetEventHandler will be callForked internally anyway
This commit is contained in:
Daniil Gentili 2020-10-06 22:38:12 +02:00 committed by GitHub
parent ed7467871a
commit b39db1dfa3
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;