docs(mcp): note --no-close for node_console websocat usage

A heredoc (<<<) closes stdin at once, so websocat dropped the WebSocket
before the device's reply arrived. Add --no-close to the node_console usage
examples and the returned command field so the connection stays open while
output is read.
This commit is contained in:
YueGuobin committed 2026-07-16 00:51:45 +08:00
1 parent d4389b7068
commit 884c40038c
2 files changed
+6 -4

No files matched your search

+1 -1
View File
@@ -328,7 +328,7 @@ def get_node_console_info_handler(params: dict[str, Any], gns3_ctx: dict[str, An
"node_name": node.get("name"),
"console_type": console_type,
"ws_url": ws_url,
"command": f"websocat {ws_url}",
"command": f"websocat -t --no-close {ws_url}",
}
if console_type in ("vnc",):
result["vnc_url"] = f"/v3/projects/{project_id}/nodes/{node_id}/console/vnc?token={gns3_ctx['jwt_token']}"