Split acks
This commit is contained in:
parent
ab6175575e
commit
62c29c9415
@ -16,6 +16,8 @@
|
||||
* sendmessage with secret messages
|
||||
* 2fa+++++
|
||||
* improved callfork
|
||||
* split acks
|
||||
|
||||
Things to expect in the next releases:
|
||||
Document async apis
|
||||
optional max_id and min_id
|
||||
|
@ -139,9 +139,11 @@ class WriteLoop extends ResumableSignalLoop
|
||||
return;
|
||||
}
|
||||
if (count($to_ack = $connection->ack_queue)) {
|
||||
$connection->pending_outgoing[$connection->pending_outgoing_key++] = ['_' => 'msgs_ack', 'serialized_body' => yield $this->API->serialize_object_async(['type' => 'msgs_ack'], ['msg_ids' => $connection->ack_queue], 'msgs_ack'), 'content_related' => false, 'unencrypted' => false, 'method' => false];
|
||||
foreach (array_chunk($connection->ack_queue, 8192) as $acks) {
|
||||
$connection->pending_outgoing[$connection->pending_outgoing_key++] = ['_' => 'msgs_ack', 'serialized_body' => yield $this->API->serialize_object_async(['type' => 'msgs_ack'], ['msg_ids' => $acks], 'msgs_ack'), 'content_related' => false, 'unencrypted' => false, 'method' => false];
|
||||
$connection->pending_outgoing_key %= Connection::PENDING_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
$has_http_wait = false;
|
||||
$messages = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user