From 438d39e4dee1a34a8158820888ee6386c9a6ef6d Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 10 Mar 2019 22:06:19 +0300 Subject: [PATCH] More fixes for getting results of being voted poll. GitOrigin-RevId: a1a8b74d3fd42a1bb6b68e7e6fbd5a3a57026a40 --- td/telegram/PollManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index 66f4274c..2235a54b 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -745,6 +745,10 @@ void PollManager::on_update_poll_timeout(PollId poll_id) { if (get_poll_is_closed(poll_id)) { return; } + if (pending_answers_.find(poll_id) != pending_answers_.end()) { + LOG(INFO) << "Skip fetching results of " << poll_id << ", because it is being voted now"; + return; + } auto it = poll_messages_.find(poll_id); if (it == poll_messages_.end()) {