Bugfixes
This commit is contained in:
parent
954c64127e
commit
afc64ca257
@ -220,6 +220,7 @@ class FeedLoop extends ResumableSignalLoop
|
||||
|
||||
$this->API->logger->logger("Not enough data: for message update $log, getting difference...", \danog\MadelineProto\Logger::VERBOSE);
|
||||
$update = ['_' => 'updateChannelTooLong'];
|
||||
if ($channelId && !yield $this->API->peer_isset_async($this->API->to_supergroup($channelId))) $channelId = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -922,8 +922,12 @@ class MTProto extends AsyncConstruct implements TLCallback
|
||||
if (!isset($this->seqUpdater)) {
|
||||
$this->seqUpdater = new SeqLoop($this);
|
||||
}
|
||||
$channelIds = [];
|
||||
foreach ($this->channels_state->get() as $state) {
|
||||
$channelId = $state->getChannel();
|
||||
$channelIds []= $state->getChannel();
|
||||
}
|
||||
sort($channelIds);
|
||||
foreach ($channelIds as $channelId) {
|
||||
if (!isset($this->feeders[$channelId])) {
|
||||
$this->feeders[$channelId] = new FeedLoop($this, $channelId);
|
||||
}
|
||||
|
@ -132,8 +132,10 @@ class Magic
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
}
|
||||
// Even an empty handler is enough to catch ctrl+c
|
||||
Loop::onSignal(SIGINT, static function () { die(); });
|
||||
Loop::onSignal(SIGTERM, static function () { die(); });
|
||||
if (defined('SIGINT')) {
|
||||
Loop::onSignal(SIGINT, static function () { die(); });
|
||||
Loop::onSignal(SIGTERM, static function () { die(); });
|
||||
}
|
||||
self::$inited = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user