Trigger EventHandler destruct

This commit is contained in:
Alexander Pankratov 2020-04-13 19:56:58 +03:00
parent 8aaf06bd2f
commit 9e18823534
2 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,7 @@ class Client
while (static::isSessionLoggedIn($instance)) {
try {
$instance->loop();
warning('Update loop stopped: ' . $instance->session);
warning('Update loop stopped: ' . Files::getSessionName($instance->session));
} catch (\Throwable $e) {
error('Error in Madeline Loop.', Logger::getExceptionAsArray($e));
Client::getInstance()->removeBrokenSessions();

View File

@ -31,6 +31,7 @@ class EventHandler extends \danog\MadelineProto\EventHandler
if (empty(static::$instances[$this->sessionName])) {
warning("Sending stop signal: {$this->sessionName}");
$this->stop();
$this->unsetEventHandler();
$this->setNoop();
return;
}