From 7e701fa7cb2000f1a767d919afcb6d5a71f304a8 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Mon, 26 Jul 2021 16:08:26 +0800 Subject: [PATCH] modify --- Server/HTTPServerListener.php | 2 +- System/Process/ServerInotify.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Server/HTTPServerListener.php b/Server/HTTPServerListener.php index d7a3649a..ce9627c4 100644 --- a/Server/HTTPServerListener.php +++ b/Server/HTTPServerListener.php @@ -111,7 +111,7 @@ class HTTPServerListener extends Abstracts\Server } else { $this->router->dispatch(); } - } catch (ExitException | Error | Throwable $exception) { + } catch (Error | Throwable $exception) { $response->setHeader('Content-Type', 'text/html; charset=utf-8'); $response->status($exception->getCode() == 0 ? 500 : $exception->getCode()); $response->end($exception->getMessage()); diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index f7f11b41..0a1dbcff 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -271,6 +271,9 @@ class ServerInotify implements CustomProcess } + const IG_DIR = [APP_PATH . 'commands', APP_PATH . '.git', APP_PATH . '.gitee']; + + /** * @param $dir * @return bool @@ -287,7 +290,7 @@ class ServerInotify implements CustomProcess return FALSE; } - if (in_array($dir, [APP_PATH . 'commands', APP_PATH . '.git', APP_PATH . '.gitee'])) { + if (in_array($dir, self::IG_DIR)) { return FALSE; }