瀏覽代碼

fix topic parser for host ID

Abhishek Kondur 2 年之前
父節點
當前提交
9a9eaec3d4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mq/util.go

+ 1 - 1
mq/util.go

@@ -99,7 +99,7 @@ func getID(topic string) (string, error) {
 func getHostID(topic string) (string, error) {
 	parts := strings.Split(topic, "/")
 	count := len(parts)
-	if count < 4 {
+	if count < 3 {
 		return "", fmt.Errorf("invalid topic")
 	}
 	return parts[2], nil