Merge pull request #50311 from thaJeztah/stack_ignore_errs

pkg/stack: suppress some unhandled errors
This commit is contained in:
Sebastiaan van Stijn authored and GitHub committed 2025-07-02 21:55:55 +02:00
commit 3b50d0dbdc
1 file changed
+4 -2
+4 -2
View File
@@ -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
}