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);