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;