From a4e98a066a3ec704af1033411ede8ae4979addc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 8 Jan 2025 11:04:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20worker=20=E6=8F=92=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20workerman=205.x=20=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/think-plugs-worker/composer.json | 2 +- plugin/think-plugs-worker/src/support/HttpServer.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/think-plugs-worker/composer.json b/plugin/think-plugs-worker/composer.json index 1ffd61513..115a6c748 100644 --- a/plugin/think-plugs-worker/composer.json +++ b/plugin/think-plugs-worker/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": ">7.1", - "workerman/workerman": "^4.1", + "workerman/workerman": "^5.0|^4.1", "zoujingli/think-install": "^1.0|@dev", "zoujingli/think-library": "^6.1|@dev" }, diff --git a/plugin/think-plugs-worker/src/support/HttpServer.php b/plugin/think-plugs-worker/src/support/HttpServer.php index 46e1c22b0..8bfdece66 100644 --- a/plugin/think-plugs-worker/src/support/HttpServer.php +++ b/plugin/think-plugs-worker/src/support/HttpServer.php @@ -90,9 +90,9 @@ class HttpServer extends Server Session::$secure = $this->app->config->get('cookie.secure', false); Session::$httpOnly = $this->app->config->get('cookie.httponly', true); Session::$sameSite = $this->app->config->get('cookie.samesite', ''); - Session::$lifetime = $this->app->config->get('session.expire', 7200); + Session::$lifetime = intval($this->app->config->get('session.expire', 7200)); Session::$cookiePath = $this->app->config->get('cookie.path', '/'); - Session::$cookieLifetime = $this->app->config->get('cookie.expire', 0); + Session::$cookieLifetime = intval($this->app->config->get('cookie.expire', 0)); } /**