1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 06:34:41 +01:00

Handle PTS exceptions by exiting update loop

This commit is contained in:
Daniil Gentili 2021-12-07 15:29:55 +01:00
parent 70b2850a04
commit cdb6411009
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -24,6 +24,7 @@ use danog\MadelineProto\Exception;
use danog\MadelineProto\Logger;
use danog\MadelineProto\Loop\InternalLoop;
use danog\MadelineProto\MTProto;
use danog\MadelineProto\PTSException;
use danog\MadelineProto\RPCErrorException;
/**
@ -120,6 +121,9 @@ class UpdateLoop extends ResumableSignalLoop
return true;
}
throw $e;
} catch (PTSException $e) {
$API->logger->logger("Got PTS exception, exiting update loop for $this: $e", Logger::FATAL_ERROR);
return true;
}
if (isset($difference['timeout'])) {
$timeout = $difference['timeout'];