Reduce total timeout limit to 2 for messages.setTyping.
This commit is contained in:
parent
c075ad7b00
commit
fa8feefed7
@ -3900,11 +3900,12 @@ class SetTypingQuery final : public Td::ResultHandler {
|
||||
if (message_id.is_valid()) {
|
||||
flags |= telegram_api::messages_setTyping::TOP_MSG_ID_MASK;
|
||||
}
|
||||
auto net_query = G()->net_query_creator().create(telegram_api::messages_setTyping(
|
||||
auto query = G()->net_query_creator().create(telegram_api::messages_setTyping(
|
||||
flags, std::move(input_peer), message_id.get_server_message_id().get(), std::move(action)));
|
||||
auto result = net_query.get_weak();
|
||||
query->total_timeout_limit_ = 2;
|
||||
auto result = query.get_weak();
|
||||
generation_ = result.generation();
|
||||
send_query(std::move(net_query));
|
||||
send_query(std::move(query));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,7 @@ SessionMultiProxy::SessionMultiProxy(int32 session_count, std::shared_ptr<AuthDa
|
||||
|
||||
void SessionMultiProxy::send(NetQueryPtr query) {
|
||||
size_t pos = 0;
|
||||
// TODO temporary hack with total_timeout_limit
|
||||
if (query->auth_flag() == NetQuery::AuthFlag::On && query->total_timeout_limit_ > 7) {
|
||||
if (query->auth_flag() == NetQuery::AuthFlag::On) {
|
||||
if (query->session_rand()) {
|
||||
pos = query->session_rand() % sessions_.size();
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user