EventHandler destruct fix

This commit is contained in:
Alexander Pankratov 2021-01-17 02:02:51 +03:00
parent 210762f9e0
commit 38246890f7
2 changed files with 4 additions and 1 deletions

View File

@ -8,4 +8,4 @@ opcache.validate_timestamps=1
opcache.revalidate_freq=0 opcache.revalidate_freq=0
opcache.huge_code_pages=1 opcache.huge_code_pages=1
opcache.jit_buffer_size=32M opcache.jit_buffer_size=32M
opcache.jit=1235 opcache.jit=function

View File

@ -22,6 +22,9 @@ class EventHandler extends \danog\MadelineProto\EventHandler
public function __destruct() public function __destruct()
{ {
if (empty($this->sessionName)) {
return;
}
unset(static::$instances[$this->sessionName]); unset(static::$instances[$this->sessionName]);
warning("Event observer DESTRUCTED: {$this->sessionName}"); warning("Event observer DESTRUCTED: {$this->sessionName}");
} }