diff --git a/td/telegram/net/ConnectionCreator.cpp b/td/telegram/net/ConnectionCreator.cpp index 55b0e2e7..661548f0 100644 --- a/td/telegram/net/ConnectionCreator.cpp +++ b/td/telegram/net/ConnectionCreator.cpp @@ -1421,8 +1421,12 @@ void ConnectionCreator::on_result(NetQueryPtr query) { if (G()->close_flag()) { return; } - LOG(ERROR) << "Receive error for getProxyData: " << res.error(); - return schedule_get_proxy_info(60); + if (res.error().message() == "BOT_METHOD_INVALID") { + get_proxy_info_timestamp_ = Timestamp::in(30 * 86400); + } else { + LOG(ERROR) << "Receive error for getProxyData: " << res.error(); + return schedule_get_proxy_info(60); + } } on_get_proxy_info(res.move_as_ok()); } diff --git a/td/telegram/net/NetQuery.cpp b/td/telegram/net/NetQuery.cpp index 8f9705b8..4e65464d 100644 --- a/td/telegram/net/NetQuery.cpp +++ b/td/telegram/net/NetQuery.cpp @@ -7,6 +7,7 @@ #include "td/telegram/net/NetQuery.h" #include "td/telegram/Global.h" +#include "td/telegram/telegram_api.h" #include "td/utils/as.h" #include "td/utils/misc.h" @@ -52,7 +53,10 @@ void NetQuery::set_error(Status status, string source) { LOG(ERROR) << "Receive INPUT_METHOD_INVALID for query " << format::as_hex_dump<4>(Slice(query_.as_slice())); } if (status.message() == "BOT_METHOD_INVALID") { - LOG(ERROR) << "Receive BOT_METHOD_INVALID for query " << format::as_hex(tl_constructor()); + auto id = tl_constructor(); + if (id != telegram_api::help_getNearestDc::ID && id != telegram_api::help_getProxyData::ID) { + LOG(ERROR) << "Receive BOT_METHOD_INVALID for query " << format::as_hex(id); + } } if (status.message() == "MSG_WAIT_FAILED" && status.code() != 400) { status = Status::Error(400, "MSG_WAIT_FAILED");