From dfa38e059d6dc40dc5132496c13e66ab1a18314b Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 14 Apr 2022 12:53:16 +0300 Subject: [PATCH] Improve NetQuery debug. --- td/telegram/net/Session.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/td/telegram/net/Session.cpp b/td/telegram/net/Session.cpp index 8ba0b7a4a..d55b5927a 100644 --- a/td/telegram/net/Session.cpp +++ b/td/telegram/net/Session.cpp @@ -995,7 +995,6 @@ void Session::add_query(NetQueryPtr &&net_query) { } void Session::connection_send_query(ConnectionInfo *info, NetQueryPtr &&net_query, uint64 message_id) { - net_query->debug("Session: trying to send to mtproto::connection"); CHECK(info->state_ == ConnectionInfo::State::Ready); current_info_ = info; @@ -1015,6 +1014,7 @@ void Session::connection_send_query(ConnectionInfo *info, NetQueryPtr &&net_quer } if (!invoke_after.empty()) { if (!unknown_queries_.empty()) { + net_query->debug("Session: wait unknown query to invoke after it"); pending_invoke_after_queries_.push_back(std::move(net_query)); return; } @@ -1022,6 +1022,7 @@ void Session::connection_send_query(ConnectionInfo *info, NetQueryPtr &&net_quer bool immediately_fail_query = false; if (!immediately_fail_query) { + net_query->debug("Session: send to mtproto::connection"); auto r_message_id = info->connection_->send_query(net_query->query().clone(), net_query->gzip_flag() == NetQuery::GzipFlag::On, message_id, invoke_after_ids, static_cast(net_query->quick_ack_promise_));