From 38246890f74c2494a2044fcfbc6bf561e60862ed Mon Sep 17 00:00:00 2001 From: Alexander Pankratov Date: Sun, 17 Jan 2021 02:02:51 +0300 Subject: [PATCH] EventHandler destruct fix --- docker/php/conf.d/opcache.ini | 2 +- src/EventObservers/EventHandler.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/php/conf.d/opcache.ini b/docker/php/conf.d/opcache.ini index 5790925..5aafa93 100644 --- a/docker/php/conf.d/opcache.ini +++ b/docker/php/conf.d/opcache.ini @@ -8,4 +8,4 @@ opcache.validate_timestamps=1 opcache.revalidate_freq=0 opcache.huge_code_pages=1 opcache.jit_buffer_size=32M -opcache.jit=1235 \ No newline at end of file +opcache.jit=function \ No newline at end of file diff --git a/src/EventObservers/EventHandler.php b/src/EventObservers/EventHandler.php index f02c7d1..7bc2ff0 100644 --- a/src/EventObservers/EventHandler.php +++ b/src/EventObservers/EventHandler.php @@ -22,6 +22,9 @@ class EventHandler extends \danog\MadelineProto\EventHandler public function __destruct() { + if (empty($this->sessionName)) { + return; + } unset(static::$instances[$this->sessionName]); warning("Event observer DESTRUCTED: {$this->sessionName}"); }