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