mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
Merge pull request #50311 from thaJeztah/stack_ignore_errs
pkg/stack: suppress some unhandled errors
This commit is contained in:
@@ -30,8 +30,10 @@ func DumpToFile(dir string) (string, error) {
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "failed to open file to write the goroutine stacks")
|
||||
}
|
||||
defer f.Close()
|
||||
defer f.Sync()
|
||||
defer func() {
|
||||
_ = f.Sync()
|
||||
_ = f.Close()
|
||||
}()
|
||||
} else {
|
||||
f = os.Stderr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user