Use CREATE_OK_REQUEST_PROMISE instead of simple RequestOnceActor.
GitOrigin-RevId: 7ba8db1c05ed06b9824e482ba6c12024c5a0106d
This commit is contained in:
parent
2f60d194cb
commit
139a858d80
@ -221,7 +221,7 @@ void SequenceDispatcher::tear_down() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
data.state_ = State::Dummy;
|
data.state_ = State::Dummy;
|
||||||
data.query_->set_error(Status::Error(500, "Internal Server Error: closing"));
|
data.query_->set_error(Status::Error(500, "Request aborted"));
|
||||||
do_finish(data);
|
do_finish(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -568,7 +568,7 @@ class Td final : public NetQueryCallback {
|
|||||||
|
|
||||||
void on_request(uint64 id, td_api::setChatTitle &request);
|
void on_request(uint64 id, td_api::setChatTitle &request);
|
||||||
|
|
||||||
void on_request(uint64 id, td_api::setChatPhoto &request);
|
void on_request(uint64 id, const td_api::setChatPhoto &request);
|
||||||
|
|
||||||
void on_request(uint64 id, td_api::setChatDraftMessage &request);
|
void on_request(uint64 id, td_api::setChatDraftMessage &request);
|
||||||
|
|
||||||
|
@ -2493,7 +2493,7 @@ void FileManager::hangup() {
|
|||||||
while (!queries_container_.empty()) {
|
while (!queries_container_.empty()) {
|
||||||
auto ids = queries_container_.ids();
|
auto ids = queries_container_.ids();
|
||||||
for (auto id : ids) {
|
for (auto id : ids) {
|
||||||
on_error(id, Status::Error(500, "Internal Server Error: closing"));
|
on_error(id, Status::Error(500, "Request aborted"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is_closed_ = true;
|
is_closed_ = true;
|
||||||
|
@ -109,7 +109,7 @@ void NetQueryDelayer::on_slot_event(uint64 id) {
|
|||||||
|
|
||||||
void NetQueryDelayer::tear_down() {
|
void NetQueryDelayer::tear_down() {
|
||||||
container_.for_each([](auto id, auto &query_slot) {
|
container_.for_each([](auto id, auto &query_slot) {
|
||||||
query_slot.query_->set_error(Status::Error(500, "Internal Server Error: closing"));
|
query_slot.query_->set_error(Status::Error(500, "Request aborted"));
|
||||||
G()->net_query_dispatcher().dispatch(std::move(query_slot.query_));
|
G()->net_query_dispatcher().dispatch(std::move(query_slot.query_));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ void NetQueryDispatcher::complete_net_query(NetQueryPtr net_query) {
|
|||||||
void NetQueryDispatcher::dispatch(NetQueryPtr net_query) {
|
void NetQueryDispatcher::dispatch(NetQueryPtr net_query) {
|
||||||
net_query->debug("dispatch");
|
net_query->debug("dispatch");
|
||||||
if (stop_flag_.load(std::memory_order_relaxed)) {
|
if (stop_flag_.load(std::memory_order_relaxed)) {
|
||||||
net_query->set_error(Status::Error(500, "Internal Server Error: closing"));
|
net_query->set_error(Status::Error(500, "Request aborted"));
|
||||||
return complete_net_query(std::move(net_query));
|
return complete_net_query(std::move(net_query));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user