mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-30 04:19:13 +01:00
Fix
This commit is contained in:
parent
7ad157021a
commit
632da98a33
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use Amp\Future\UnhandledFutureError;
|
use Amp\Future\UnhandledFutureError;
|
||||||
use Amp\SignalException;
|
use Amp\SignalException;
|
||||||
|
use Amp\Sql\SqlException;
|
||||||
use danog\MadelineProto\SecurityException;
|
use danog\MadelineProto\SecurityException;
|
||||||
use Revolt\EventLoop;
|
use Revolt\EventLoop;
|
||||||
use TelegramApiServer\Logger;
|
use TelegramApiServer\Logger;
|
||||||
@ -121,7 +122,7 @@ EventLoop::setErrorHandler(function (\Throwable $e) {
|
|||||||
if ($e instanceof UnhandledFutureError) {
|
if ($e instanceof UnhandledFutureError) {
|
||||||
$e = $e->getPrevious();
|
$e = $e->getPrevious();
|
||||||
}
|
}
|
||||||
if ($e instanceof SecurityException || $e instanceof SignalException) {
|
if ($e instanceof SecurityException || $e instanceof SignalException || $e instanceof SqlException) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
if (str_starts_with($e->getMessage(), 'Could not connect to DC ')) {
|
if (str_starts_with($e->getMessage(), 'Could not connect to DC ')) {
|
||||||
|
@ -14,6 +14,8 @@ use ReflectionProperty;
|
|||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use TelegramApiServer\EventObservers\EventObserver;
|
use TelegramApiServer\EventObservers\EventObserver;
|
||||||
|
|
||||||
|
use function Amp\Socket\SocketAddress\fromString;
|
||||||
|
|
||||||
final class Client
|
final class Client
|
||||||
{
|
{
|
||||||
public static Client $self;
|
public static Client $self;
|
||||||
|
Loading…
Reference in New Issue
Block a user