support MSG_WAIT_TIMEOUT
This commit is contained in:
parent
ff153bef36
commit
313f0b45df
@ -139,7 +139,8 @@ void SequenceDispatcher::on_result(NetQueryPtr query) {
|
||||
}
|
||||
|
||||
if (query->is_error() && (query->error().code() == NetQuery::ResendInvokeAfter ||
|
||||
(query->error().code() == 400 && query->error().message() == "MSG_WAIT_FAILED"))) {
|
||||
(query->error().code() == 400 && (query->error().message() == "MSG_WAIT_FAILED" ||
|
||||
query->error().message() == "MSG_WAIT_TIMEOUT")))) {
|
||||
VLOG(net_query) << "Resend " << query;
|
||||
query->resend();
|
||||
query->debug("Waiting at SequenceDispatcher");
|
||||
|
@ -711,7 +711,7 @@ class CliClient final : public Actor {
|
||||
}
|
||||
|
||||
template <class FirstType, class SecondType, class... Types>
|
||||
static void get_args(string &args, FirstType &first_arg, SecondType &second_arg, Types &... other_args) {
|
||||
static void get_args(string &args, FirstType &first_arg, SecondType &second_arg, Types &...other_args) {
|
||||
string arg;
|
||||
std::tie(arg, args) = split(args);
|
||||
get_args(arg, first_arg);
|
||||
@ -3111,7 +3111,7 @@ class CliClient final : public Actor {
|
||||
} else if (op == "smt" || op == "smtp" || op == "smtf" || op == "smtpf") {
|
||||
const string &chat_id = args;
|
||||
for (int i = 1; i <= 200; i++) {
|
||||
string message = PSTRING() << "#" << i;
|
||||
string message = PSTRING() << (td::Random::fast(0, 3) == 0 && i > 90 ? "sleep " : "") << "#" << i;
|
||||
if (i == 6 || (op.back() == 'f' && i % 2 == 0)) {
|
||||
message = string(4097, 'a');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user