Add more close_flag checks.
This commit is contained in:
parent
7458a0fc15
commit
7974571615
@ -11829,6 +11829,9 @@ void MessagesManager::repair_server_dialog_total_count(DialogListId dialog_list_
|
|||||||
// can repair total count only in folders
|
// can repair total count only in folders
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LOG(INFO) << "Repair total chat count in " << dialog_list_id;
|
LOG(INFO) << "Repair total chat count in " << dialog_list_id;
|
||||||
send_closure(td_->create_net_actor<GetDialogListActor>(Promise<Unit>()), &GetDialogListActor::send,
|
send_closure(td_->create_net_actor<GetDialogListActor>(Promise<Unit>()), &GetDialogListActor::send,
|
||||||
@ -24779,6 +24782,9 @@ void MessagesManager::on_message_media_uploaded(DialogId dialog_id, const Messag
|
|||||||
FileId thumbnail_file_id) {
|
FileId thumbnail_file_id) {
|
||||||
CHECK(m != nullptr);
|
CHECK(m != nullptr);
|
||||||
CHECK(input_media != nullptr);
|
CHECK(input_media != nullptr);
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto message_id = m->message_id;
|
auto message_id = m->message_id;
|
||||||
if (message_id.is_any_server()) {
|
if (message_id.is_any_server()) {
|
||||||
@ -24862,6 +24868,9 @@ void MessagesManager::on_secret_message_media_uploaded(DialogId dialog_id, const
|
|||||||
CHECK(m != nullptr);
|
CHECK(m != nullptr);
|
||||||
CHECK(m->message_id.is_valid());
|
CHECK(m->message_id.is_valid());
|
||||||
CHECK(!secret_input_media.empty());
|
CHECK(!secret_input_media.empty());
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
if (m->media_album_id != 0) {
|
if (m->media_album_id != 0) {
|
||||||
switch (secret_input_media->input_file_->get_id()) {
|
switch (secret_input_media->input_file_->get_id()) {
|
||||||
@ -25065,6 +25074,10 @@ void MessagesManager::do_send_message_group(int64 media_album_id) {
|
|||||||
// the group may be already sent or failed to be sent
|
// the group may be already sent or failed to be sent
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto &request = it->second;
|
auto &request = it->second;
|
||||||
|
|
||||||
auto dialog_id = request.dialog_id;
|
auto dialog_id = request.dialog_id;
|
||||||
@ -25168,6 +25181,9 @@ void MessagesManager::on_text_message_ready_to_send(DialogId dialog_id, MessageI
|
|||||||
if (m == nullptr) {
|
if (m == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CHECK(message_id.is_yet_unsent());
|
CHECK(message_id.is_yet_unsent());
|
||||||
|
|
||||||
@ -26973,6 +26989,9 @@ void MessagesManager::do_forward_messages(DialogId to_dialog_id, DialogId from_d
|
|||||||
if (messages.empty()) {
|
if (messages.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (log_event_id == 0 && G()->parameters().use_message_db) {
|
if (log_event_id == 0 && G()->parameters().use_message_db) {
|
||||||
log_event_id = save_forward_messages_log_event(to_dialog_id, from_dialog_id, messages, message_ids);
|
log_event_id = save_forward_messages_log_event(to_dialog_id, from_dialog_id, messages, message_ids);
|
||||||
@ -37661,6 +37680,9 @@ MessagesManager::Message *MessagesManager::continue_send_message(DialogId dialog
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MessagesManager::on_binlog_events(vector<BinlogEvent> &&events) {
|
void MessagesManager::on_binlog_events(vector<BinlogEvent> &&events) {
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (auto &event : events) {
|
for (auto &event : events) {
|
||||||
CHECK(event.id_ != 0);
|
CHECK(event.id_ != 0);
|
||||||
switch (event.type_) {
|
switch (event.type_) {
|
||||||
|
@ -4095,6 +4095,9 @@ void NotificationManager::try_send_update_active_notifications() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NotificationManager::on_binlog_events(vector<BinlogEvent> &&events) {
|
void NotificationManager::on_binlog_events(vector<BinlogEvent> &&events) {
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
VLOG(notifications) << "Begin to process " << events.size() << " binlog events";
|
VLOG(notifications) << "Begin to process " << events.size() << " binlog events";
|
||||||
for (auto &event : events) {
|
for (auto &event : events) {
|
||||||
if (!G()->parameters().use_message_db || is_disabled() || max_notification_group_count_ == 0) {
|
if (!G()->parameters().use_message_db || is_disabled() || max_notification_group_count_ == 0) {
|
||||||
|
@ -1676,6 +1676,9 @@ void PollManager::on_get_poll_vote(PollId poll_id, UserId user_id, vector<Buffer
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PollManager::on_binlog_events(vector<BinlogEvent> &&events) {
|
void PollManager::on_binlog_events(vector<BinlogEvent> &&events) {
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (auto &event : events) {
|
for (auto &event : events) {
|
||||||
switch (event.type_) {
|
switch (event.type_) {
|
||||||
case LogEvent::HandlerType::SetPollAnswer: {
|
case LogEvent::HandlerType::SetPollAnswer: {
|
||||||
|
Loading…
Reference in New Issue
Block a user