mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-12-02 09:17:46 +01:00
unsetEvent handler fix
This commit is contained in:
parent
bbe182901d
commit
32cb13b6a8
@ -60,7 +60,9 @@ class Client
|
|||||||
Files::checkOrCreateSessionFolder($file);
|
Files::checkOrCreateSessionFolder($file);
|
||||||
$settings = array_replace_recursive((array) Config::getInstance()->get('telegram'), $settings);
|
$settings = array_replace_recursive((array) Config::getInstance()->get('telegram'), $settings);
|
||||||
$instance = new MadelineProto\API($file, $settings);
|
$instance = new MadelineProto\API($file, $settings);
|
||||||
$instance->unsetEventHandler();
|
if (self::isSessionLoggedIn($instance)) {
|
||||||
|
$instance->unsetEventHandler();
|
||||||
|
}
|
||||||
$instance->async(true);
|
$instance->async(true);
|
||||||
|
|
||||||
$this->instances[$session] = $instance;
|
$this->instances[$session] = $instance;
|
||||||
|
@ -162,6 +162,7 @@ class Logger extends AbstractLogger
|
|||||||
'file' => $exception->getFile(),
|
'file' => $exception->getFile(),
|
||||||
'line' => $exception->getLine(),
|
'line' => $exception->getLine(),
|
||||||
'code' => $exception->getCode(),
|
'code' => $exception->getCode(),
|
||||||
|
'backtrace' => array_slice($exception->getTrace(), 0, 3),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user