From fb1d5172cac01c5df93ed3cf515995f0ae7dea4b Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 27 Feb 2021 04:56:35 +0800 Subject: [PATCH] modify --- System/Snowflake.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/System/Snowflake.php b/System/Snowflake.php index 515db26e..55c4b46d 100644 --- a/System/Snowflake.php +++ b/System/Snowflake.php @@ -176,6 +176,10 @@ class Snowflake { $dir = storage(null, 'worker'); foreach (glob($dir . '/*') as $file) { + clearstatcache(); + if (!file_exists($file)) { + continue; + } @unlink($file); } } @@ -389,7 +393,7 @@ class Snowflake */ public static function reload(): mixed { - return Process::kill((int)Snowflake::getMasterPid(),SIGUSR1); + return Process::kill((int)Snowflake::getMasterPid(), SIGUSR1); }