Commit d6db27b7 authored by Vysheng's avatar Vysheng

Fixed 500 error

parent 77ab47b6
......@@ -226,8 +226,13 @@ void tglq_query_error (long long id) {
res = q->methods->on_error (q, error_code, error_len, error);
} else {
if (error_code == 420 || error_code == 500) {
int wait;
if (error_code == 420) {
assert (!strncmp (error, "FLOOD_WAIT_", 11));
int wait = atoll (error + 11);
wait = atoll (error + 11);
} else {
wait = 10;
}
q->flags &= ~QUERY_ACK_RECEIVED;
static struct timeval ptimeout;
ptimeout.tv_sec = wait;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment