mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
command/server: fix bug with sigusr2 where pprof files were not closed (#23636)
* command/server: fix bug with sigusr2 where pprof files were not closed * changelog
This commit is contained in:
parent
e277571c37
commit
7872338ec1
2 changed files with 5 additions and 0 deletions
3
changelog/23636.txt
Normal file
3
changelog/23636.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
command/server: Fix bug with sigusr2 where pprof files were not closed correctly
|
||||
```
|
||||
|
|
@ -1830,8 +1830,10 @@ func (c *ServerCommand) Run(args []string) int {
|
|||
err = pprof.Lookup(dump).WriteTo(pFile, 0)
|
||||
if err != nil {
|
||||
c.logger.Error("error generating pprof data", "name", dump, "error", err)
|
||||
pFile.Close()
|
||||
break
|
||||
}
|
||||
pFile.Close()
|
||||
}
|
||||
|
||||
c.logger.Info(fmt.Sprintf("Wrote pprof files to: %s", dir))
|
||||
|
|
|
|||
Loading…
Reference in a new issue