fix monitor

This commit is contained in:
hxy7yx
2025-02-25 00:45:17 -08:00
parent 7a778f3871
commit df7080e3f5
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -18,7 +18,7 @@
"description_zh": "事件消息发布的主题前缀",
"type": "string",
"attribute": "required",
"default": "/neuron/{client-id}",
"default": "/neuron/monitor/${random_str}",
"valid": {
"length": 255
}
@@ -42,7 +42,7 @@
"description_zh": "心跳消息发布的主题",
"type": "string",
"attribute": "required",
"default": "/neuron/${node-name}/heartbeat",
"default": "/neuron/heartbeat/${random_str}",
"valid": {
"length": 255
}
+2 -1
View File
@@ -86,7 +86,8 @@ static inline int send_node_update_req(nng_aio * aio,
return NEU_ERR_NODE_NAME_EMPTY;
}
if (strcmp(req->new_name, "monitor") == 0) {
if (strcmp(req->new_name, "monitor") == 0 ||
strcmp(req->name, "monitor") == 0) {
return NEU_ERR_NODE_NOT_ALLOW_UPDATE;
}