Fixed 500 error
This commit is contained in:
parent
77ab47b638
commit
d6db27b7d5
@ -226,8 +226,13 @@ void tglq_query_error (long long id) {
|
|||||||
res = q->methods->on_error (q, error_code, error_len, error);
|
res = q->methods->on_error (q, error_code, error_len, error);
|
||||||
} else {
|
} else {
|
||||||
if (error_code == 420 || error_code == 500) {
|
if (error_code == 420 || error_code == 500) {
|
||||||
|
int wait;
|
||||||
|
if (error_code == 420) {
|
||||||
assert (!strncmp (error, "FLOOD_WAIT_", 11));
|
assert (!strncmp (error, "FLOOD_WAIT_", 11));
|
||||||
int wait = atoll (error + 11);
|
wait = atoll (error + 11);
|
||||||
|
} else {
|
||||||
|
wait = 10;
|
||||||
|
}
|
||||||
q->flags &= ~QUERY_ACK_RECEIVED;
|
q->flags &= ~QUERY_ACK_RECEIVED;
|
||||||
static struct timeval ptimeout;
|
static struct timeval ptimeout;
|
||||||
ptimeout.tv_sec = wait;
|
ptimeout.tv_sec = wait;
|
||||||
|
Loading…
Reference in New Issue
Block a user