From 34d46fb58c03c72a4aed1d4410ec2f415dc65885 Mon Sep 17 00:00:00 2001 From: Arseny Smirnov Date: Tue, 13 Feb 2018 20:22:23 +0300 Subject: [PATCH] SecretChatActor bugfix GitOrigin-RevId: 13daf2ca4e436b5e68be674daeb7d8adb58b39f4 --- td/telegram/SecretChatActor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/td/telegram/SecretChatActor.cpp b/td/telegram/SecretChatActor.cpp index db7535bd..300126e2 100644 --- a/td/telegram/SecretChatActor.cpp +++ b/td/telegram/SecretChatActor.cpp @@ -943,12 +943,14 @@ Status SecretChatActor::do_inbound_message_decrypted_unchecked( uint32 start_seq_no = static_cast(action_resend->start_seq_no_ / 2); uint32 finish_seq_no = static_cast(action_resend->end_seq_no_ / 2); if (start_seq_no + MAX_RESEND_COUNT < finish_seq_no) { + message->qts_ack.set_value(Unit()); return Status::Error(PSLICE() << "Won't resend more than " << MAX_RESEND_COUNT << " messages"); } LOG(INFO) << "ActionResend: " << tag("start", start_seq_no) << tag("finish_seq_no", finish_seq_no); for (auto seq_no = start_seq_no; seq_no <= finish_seq_no; seq_no++) { auto it = out_seq_no_to_outbound_message_state_token_.find(seq_no); if (it == out_seq_no_to_outbound_message_state_token_.end()) { + message->qts_ack.set_value(Unit()); return Status::Error(PSLICE() << "Can't resend query " << tag("seq_no", seq_no)); } auto state_id = it->second;