From cdce8f088c2698fc2730ddd6a62f0e125bf41208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 1 Sep 2020 04:14:55 +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 --- http-server/Events/WebSocket.php | 2 +- http-server/Route/Annotation/Websocket.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/http-server/Events/WebSocket.php b/http-server/Events/WebSocket.php index fccd6b25..bf7e8f2c 100644 --- a/http-server/Events/WebSocket.php +++ b/http-server/Events/WebSocket.php @@ -95,7 +95,7 @@ class WebSocket extends Server /** @var AWebsocket $manager */ $manager = Snowflake::get()->annotation->get('websocket'); - $manager->runWith($manager->getName(AWebsocket::MESSAGE, [0, $frame->data['route']]), [$frame, $server]); + $manager->runWith($manager->getName(AWebsocket::MESSAGE, [null, null, $frame->data['route']]), [$frame, $server]); } catch (Exception $exception) { $this->application->addError($exception->getMessage(), 'websocket'); $server->send($frame->fd, $exception->getMessage()); diff --git a/http-server/Route/Annotation/Websocket.php b/http-server/Route/Annotation/Websocket.php index c0f1bcd3..d797e9f0 100644 --- a/http-server/Route/Annotation/Websocket.php +++ b/http-server/Route/Annotation/Websocket.php @@ -56,7 +56,7 @@ class Websocket extends Annotation { $prefix = 'WEBSOCKET:ANNOTATION:' . $events; if (isset($comment[2])) { - return $prefix . ':' . $comment[2]; + return rtrim($prefix, ':') . ':' . $comment[2]; } return $prefix; }