瀏覽代碼

fix off by one error in GetID

Matthew R Kasun 3 年之前
父節點
當前提交
fd981f3d3a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mq/mq.go

+ 1 - 1
mq/mq.go

@@ -175,5 +175,5 @@ func GetID(topic string) (string, error) {
 		return "", errors.New("invalid topic")
 	}
 	//the last part of the topic will be the node.ID
-	return parts[count], nil
+	return parts[count-1], nil
 }