From d48c00bc5db2270648f82818a2b5917b8f580d2a Mon Sep 17 00:00:00 2001 From: PandaX <18610165312@163.com> Date: Fri, 29 Aug 2025 06:42:39 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20topic=E5=8E=BB=E9=99=A4=E7=A9=BA?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: PandaX <18610165312@163.com> --- iothub/server/emqxserver/const.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iothub/server/emqxserver/const.go b/iothub/server/emqxserver/const.go index 7011162..787232e 100644 --- a/iothub/server/emqxserver/const.go +++ b/iothub/server/emqxserver/const.go @@ -38,6 +38,8 @@ func NewIotHubTopic() TopicMeg { } func (iht TopicMeg) GetMessageType(topic string) string { + //删除topic的前后空格 + topic = strings.TrimSpace(topic) if meg, ok := iht[topic]; ok { return meg }