Bugfix
This commit is contained in:
parent
11ec3fdb45
commit
979e29ac69
@ -91,13 +91,11 @@ trait CallHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 420:
|
case 420:
|
||||||
if ($this->settings['pwr']['pwr']) {
|
$seconds = preg_replace('/[^0-9]+/', '', $server_answer['error_message']);
|
||||||
$seconds = preg_replace('/[^0-9]+/', '', $server_answer['error_message']);
|
if (is_numeric($seconds) && $seconds < $this->settings['flood_timeout']['wait_if_lt']) {
|
||||||
if (is_numeric($seconds) && $seconds < $this->settings['flood_timeout']['wait_if_lt']) {
|
\danog\MadelineProto\Logger::log(['Flood, waiting '.$seconds.' seconds...'], \danog\MadelineProto\Logger::NOTICE);
|
||||||
\danog\MadelineProto\Logger::log(['Flood, waiting '.$seconds.' seconds...'], \danog\MadelineProto\Logger::NOTICE);
|
sleep($seconds);
|
||||||
sleep($seconds);
|
throw new \danog\MadelineProto\Exception('Re-executing query...');
|
||||||
throw new \danog\MadelineProto\Exception('Re-executing query...');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']);
|
throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user