提交 3b61bb28 编写于 作者: K kestrelcjx

chore(process): add ctx.Done() to break select

上级 db054ec1
......@@ -751,6 +751,8 @@ func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, er
})
fileExists[fileName] = true
}
case <-ctx.Done():
return files, nil
}
}
......
......@@ -738,6 +738,8 @@ func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, er
})
fileExists[fileName] = true
}
case <-ctx.Done():
return files, nil
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册