mirror of
https://github.com/tdlib/telegram-bot-api
synced 2025-08-30 22:05:37 +00:00
Update TDLib and asynchronously destroy deleted TQueue events.
This commit is contained in:
2
td
2
td
Submodule td updated: ac0de06b5f...eeb73d4eb2
@@ -5292,7 +5292,8 @@ void Client::timeout_expired() {
|
||||
void Client::clear_tqueue() {
|
||||
CHECK(webhook_id_.empty());
|
||||
auto &tqueue = parameters_->shared_data_->tqueue_;
|
||||
tqueue->clear(tqueue_id_, 0);
|
||||
auto deleted_events = tqueue->clear(tqueue_id_, 0);
|
||||
td::Scheduler::instance()->destroy_on_scheduler(SharedData::get_file_gc_scheduler_id(), deleted_events);
|
||||
}
|
||||
|
||||
bool Client::to_bool(td::MutableSlice value) {
|
||||
@@ -9533,7 +9534,8 @@ void Client::do_get_updates(int32 offset, int32 limit, int32 timeout, PromisedQu
|
||||
LOG(DEBUG) << "Queue head = " << tqueue->get_head(tqueue_id_) << ", queue tail = " << tqueue->get_tail(tqueue_id_);
|
||||
|
||||
if (offset < 0) {
|
||||
tqueue->clear(tqueue_id_, -offset);
|
||||
auto deleted_events = tqueue->clear(tqueue_id_, -offset);
|
||||
td::Scheduler::instance()->destroy_on_scheduler(SharedData::get_file_gc_scheduler_id(), deleted_events);
|
||||
}
|
||||
if (offset <= 0) {
|
||||
offset = tqueue->get_head(tqueue_id_).value();
|
||||
|
Reference in New Issue
Block a user