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