mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 00:11:20 +01:00
Small optimization
This commit is contained in:
parent
10f22111ac
commit
500cda829f
@ -270,6 +270,12 @@ trait UpdateHandler
|
||||
'timeout' => $timeout
|
||||
] = array_merge(['offset' => 0, 'limit' => null, 'timeout' => INF], $params);
|
||||
|
||||
foreach ($this->updates as $key => $value) {
|
||||
if ($offset > $key) {
|
||||
unset($this->updates[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->updates) {
|
||||
try {
|
||||
$this->update_deferred = new DeferredFuture();
|
||||
|
Loading…
x
Reference in New Issue
Block a user