mirror of
https://github.com/PaiGramTeam/telegram-bot-api.git
synced 2024-11-26 10:16:29 +00:00
Destroy HttpQuery on another thread.
This commit is contained in:
parent
70428fb762
commit
d3846adaa2
@ -114,6 +114,8 @@ class Query final : public td::ListNode {
|
||||
if (!empty()) {
|
||||
shared_data_->query_list_size_.fetch_sub(1, std::memory_order_relaxed);
|
||||
}
|
||||
td::Scheduler::instance()->destroy_on_scheduler(SharedData::get_file_gc_scheduler_id(), container_, args_,
|
||||
headers_, files_, answer_);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -590,6 +590,11 @@ void WebhookActor::send_updates() {
|
||||
}
|
||||
|
||||
void WebhookActor::handle(td::unique_ptr<td::HttpQuery> response) {
|
||||
SCOPE_EXIT {
|
||||
bool dummy = false;
|
||||
td::Scheduler::instance()->destroy_on_scheduler(SharedData::get_file_gc_scheduler_id(), response, dummy);
|
||||
};
|
||||
|
||||
auto connection_id = get_link_token();
|
||||
if (response) {
|
||||
VLOG(webhook) << "Got response from connection " << connection_id;
|
||||
|
Loading…
Reference in New Issue
Block a user