1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-10 16:28:16 +01:00

Fix psalm

This commit is contained in:
Daniil Gentili 2024-12-10 15:32:22 +00:00
parent f3ae713428
commit 1105ee7ab0

View File

@ -454,6 +454,7 @@ trait ResponseHandler
return static fn () => RPCErrorException::make($response['error_message'], $response['error_code'], $request->constructor); return static fn () => RPCErrorException::make($response['error_message'], $response['error_code'], $request->constructor);
case 420: case 420:
$seconds = (int) preg_replace('/[^0-9]+/', '', $response['error_message']); $seconds = (int) preg_replace('/[^0-9]+/', '', $response['error_message']);
\assert($seconds > 0);
$limit = $request->floodWaitLimit ?? $this->API->settings->getRPC()->getFloodTimeout(); $limit = $request->floodWaitLimit ?? $this->API->settings->getRPC()->getFloodTimeout();
if ($seconds < $limit) { if ($seconds < $limit) {
$this->API->logger("Flood, waiting $seconds seconds before repeating async call of $request...", Logger::NOTICE); $this->API->logger("Flood, waiting $seconds seconds before repeating async call of $request...", Logger::NOTICE);