1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 08:18:59 +01:00

CDN bugfix

This commit is contained in:
Daniil Gentili 2019-11-10 19:31:11 +01:00
parent 98b203ac44
commit bb9804290b
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -1626,7 +1626,8 @@ class MTProto extends AsyncConstruct implements TLCallback
{ {
try { try {
foreach ((yield $this->methodCallAsyncRead('help.getCdnConfig', [], ['datacenter' => $datacenter]))['public_keys'] as $curkey) { foreach ((yield $this->methodCallAsyncRead('help.getCdnConfig', [], ['datacenter' => $datacenter]))['public_keys'] as $curkey) {
$this->cdn_rsa_keys[$tempkey->fp] = yield (new RSA)->load($this->TL, $curkey['public_key']); $curkey = yield (new RSA)->load($this->TL, $curkey['public_key']);
$this->cdn_rsa_keys[$curkey->fp] = $curkey;
} }
} catch (\danog\MadelineProto\TL\Exception $e) { } catch (\danog\MadelineProto\TL\Exception $e) {
$this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::FATAL_ERROR); $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::FATAL_ERROR);