Create mIdHandler on startup

This commit is contained in:
Daniil Gentili 2020-02-08 01:51:07 +01:00
parent bdd86d4efb
commit f899fc56e6

View File

@ -327,6 +327,7 @@ class Connection extends Session
$this->datacenter = $ctx->getDc();
$this->datacenterId = $this->datacenter . '.' . $this->id;
$this->API->logger->logger("Connecting to DC {$this->datacenterId}", \danog\MadelineProto\Logger::WARNING);
$this->createSession();
$ctx->setReadCallback([$this, 'haveRead']);
$this->stream = (yield from $ctx->getStream());
$this->API->logger->logger("Connected to DC {$this->datacenterId}!", \danog\MadelineProto\Logger::WARNING);