Skip to content

Commit 6397242

Browse files
author
zhuque-security
committed
mcp扫描并行
1 parent 134114b commit 6397242

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/cli/cmd/mcp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ var mcpCmd = &cobra.Command{
119119

120120
// 执行扫描
121121
gologger.Infof("开始扫描...")
122-
results, err := scanner.Scan(ctx)
122+
results, err := scanner.Scan(ctx, false)
123123
if err != nil {
124124
gologger.Fatalf("扫描失败: %v", err)
125125
}

common/websocket/mcp_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func (s *WSServer) handleMcpScan(ctx context.Context, conn *websocket.Conn, req
274274
scanner.SetLanguage(req.Language)
275275
scanner.SetCallback(processFunc)
276276
scanner.InputCodePath(req.Path)
277-
_, err := scanner.Scan(ctx)
277+
_, err := scanner.Scan(ctx, false)
278278
if err != nil {
279279
gologger.Errorf("扫描失败: %v\n", err)
280280
writer2.Flush()

0 commit comments

Comments
 (0)