mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 14:34:39 +01:00
Trying to fix bugs
This commit is contained in:
parent
ead78628ed
commit
491c15e5e3
@ -78,13 +78,16 @@ trait CallHandler
|
||||
throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
|
||||
case 420:
|
||||
$seconds = preg_replace('/[^0-9]+/', '', $server_answer['error_message']);
|
||||
\danog\MadelineProto\Logger::log('Flood, waiting '.$seconds.' seconds...');
|
||||
sleep($seconds);
|
||||
throw new \danog\MadelineProto\Exception('Re-executing query...');
|
||||
*/
|
||||
if ($this->settings['pwr']['pwr']) {
|
||||
$seconds = preg_replace('/[^0-9]+/', '', $server_answer['error_message']);
|
||||
if (is_numeric($seconds) && $seconds < 20) {
|
||||
\danog\MadelineProto\Logger::log('Flood, waiting '.$seconds.' seconds...');
|
||||
sleep($seconds);
|
||||
throw new \danog\MadelineProto\Exception('Re-executing query...');
|
||||
}
|
||||
}
|
||||
default:
|
||||
throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user