From 27da36d0f8b9ef4b7cde56007b41e6a5194924e3 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 19 Jul 2024 17:36:29 +0300 Subject: [PATCH] make updateSession async --- src/Entity/Browser/Container/Tab.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Entity/Browser/Container/Tab.php b/src/Entity/Browser/Container/Tab.php index d26d456d..9674af8c 100644 --- a/src/Entity/Browser/Container/Tab.php +++ b/src/Entity/Browser/Container/Tab.php @@ -252,13 +252,20 @@ class Tab public function updateSession(): void { - $this->container->browser->database->cleanSession(); + $pid = pcntl_fork(); - foreach ($this->_page as $page) + if ($pid === 0) { - $this->container->browser->database->addSession( - $page->navbar->request->getValue() - ); + $this->container->browser->database->cleanSession(); + + foreach ($this->_page as $page) + { + $this->container->browser->database->addSession( + $page->navbar->request->getValue() + ); + } + + exit; } } } \ No newline at end of file