From ab9b5ed9ccaf554e3aa417e36db701a7b4c0b1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 1 Sep 2020 04:33:57 +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/Route/Annotation/Websocket.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-server/Route/Annotation/Websocket.php b/http-server/Route/Annotation/Websocket.php index 63c9c43e..24203f1e 100644 --- a/http-server/Route/Annotation/Websocket.php +++ b/http-server/Route/Annotation/Websocket.php @@ -54,8 +54,8 @@ class Websocket extends Annotation */ public function getName($events, $comment = []) { - $prefix = rtrim('WEBSOCKET:ANNOTATION:' . $events, ':'); - if (isset($comment[2])) { + $prefix = 'WEBSOCKET:ANNOTATION:' . ltrim($events, ':'); + if (isset($comment[2]) && !empty($comment[2])) { return $prefix . ':' . $comment[2]; } return $prefix;