File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ void AdnlPeerPairImpl::alarm() {
7070 retry_send_at_ = td::Timestamp::never ();
7171 auto messages = std::move (pending_messages_);
7272 pending_messages_.clear ();
73- send_messages_in (std::move (messages), true );
73+ send_messages_in (std::move (messages), false );
7474 }
7575 alarm_timestamp ().relax (next_dht_query_at_);
7676 alarm_timestamp ().relax (next_db_update_at_);
@@ -267,7 +267,9 @@ void AdnlPeerPairImpl::send_messages_in(std::vector<OutboundAdnlMessage> message
267267 size_t ptr = 0 ;
268268 bool first = true ;
269269 do {
270- size_t s = (channel_ready_ ? channel_packet_header_max_size () : packet_header_max_size ());
270+ bool try_reinit = try_reinit_at_ && try_reinit_at_.is_in_past ();
271+ bool via_channel = channel_ready_ && !try_reinit;
272+ size_t s = (via_channel ? channel_packet_header_max_size () : packet_header_max_size ());
271273 if (first) {
272274 s += 2 * addr_list_max_size ();
273275 }
@@ -311,8 +313,6 @@ void AdnlPeerPairImpl::send_messages_in(std::vector<OutboundAdnlMessage> message
311313 }
312314 }
313315
314- bool try_reinit = try_reinit_at_ && try_reinit_at_.is_in_past ();
315- bool via_channel = channel_ready_ && !try_reinit;
316316 if (!via_channel) {
317317 packet.set_reinit_date (Adnl::adnl_start_time (), reinit_date_);
318318 packet.set_source (local_id_);
You can’t perform that action at this time.
0 commit comments