From 8d83dedd2bc2fe20dc2fa68154657d61899425ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 21 Jul 2021 14:30:34 +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 --- Server/HTTPServerListener.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Server/HTTPServerListener.php b/Server/HTTPServerListener.php index 80651008..501bf3a2 100644 --- a/Server/HTTPServerListener.php +++ b/Server/HTTPServerListener.php @@ -113,7 +113,17 @@ class HTTPServerListener extends Abstracts\Server */ public function onDisconnect(Server $server, int $fd) { - $this->runEvent(Constant::CONNECT, null, [$server, $fd]); + $this->runEvent(Constant::DISCONNECT, null, [$server, $fd]); + } + + + /** + * @param Server $server + * @param int $fd + */ + public function onClose(Server $server, int $fd) + { + $this->runEvent(Constant::CLOSE, null, [$server, $fd]); } }