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