From 1601b703def5bd80596397b6ea9409e4d3fbfefd Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 14 May 2024 20:45:10 +0300 Subject: [PATCH] Fix condition for creation of a new log event. --- td/telegram/PollManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index b910240e6..e4ebe8c18 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -914,7 +914,7 @@ void PollManager::do_set_poll_answer(PollId poll_id, MessageFullId message_full_ log_event.message_full_id_ = message_full_id; log_event.options_ = options; auto storer = get_log_event_storer(log_event); - if (pending_answer.generation_ == 0) { + if (pending_answer.generation_ == 0 || pending_answer.is_finished_) { CHECK(pending_answer.log_event_id_ == 0); log_event_id = binlog_add(G()->td_db()->get_binlog(), LogEvent::HandlerType::SetPollAnswer, storer); LOG(INFO) << "Add set poll answer log event " << log_event_id;