From f87a7ece13231f19dbadc19a91e1f932745b069d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 4 Mar 2021 00:56:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Events/OnClose.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HttpServer/Events/OnClose.php b/HttpServer/Events/OnClose.php index d2b4e9bb..4da045ae 100644 --- a/HttpServer/Events/OnClose.php +++ b/HttpServer/Events/OnClose.php @@ -49,6 +49,12 @@ class OnClose extends Callback private function execute(Server $server, int $fd): void { try { + if (!$server instanceof WServer) { + return; + } + if (!$server->isEstablished($fd)) { + return; + } $this->loadNode($server, $fd); } catch (\Throwable $exception) { $this->addError($exception);