From a0b60775028d837b0a7d7b0a7a4ae294a9d18361 Mon Sep 17 00:00:00 2001 From: kestrelcjx Date: Sat, 20 Nov 2021 21:25:08 +0800 Subject: [PATCH] chore(process): change the return value --- process/process_windows.go | 2 +- v3/process/process_windows.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/process/process_windows.go b/process/process_windows.go index aa9dbc41f..e410a0eb1 100644 --- a/process/process_windows.go +++ b/process/process_windows.go @@ -752,7 +752,7 @@ func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, er fileExists[fileName] = true } case <-ctx.Done(): - return files, nil + return files, ctx.Err() } } diff --git a/v3/process/process_windows.go b/v3/process/process_windows.go index 5194c082f..4f004ff9f 100644 --- a/v3/process/process_windows.go +++ b/v3/process/process_windows.go @@ -739,7 +739,7 @@ func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, er fileExists[fileName] = true } case <-ctx.Done(): - return files, nil + return files, ctx.Err() } }