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)); } /**