We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b8618c commit 1547f11Copy full SHA for 1547f11
pprof_unix.go
@@ -26,10 +26,8 @@ func servePprof() {
26
}
27
28
// remove the old file, if it exists. It's probably from the last run of the provider
29
- if _, err = os.Stat("../.coder/pprof"); err == nil {
30
- if err = os.Remove("../.coder/pprof"); err != nil {
31
- return
32
- }
+ if err = os.Remove("../.coder/pprof"); err != nil && !os.IsNotExist(err) {
+ return
33
34
l, err := net.Listen("unix", "../.coder/pprof")
35
if err != nil {
0 commit comments