mirror of
https://github.com/google/gops.git
synced 2025-02-19 19:59:55 +02:00
handle error if CPU profile cannot start
This commit is contained in:
parent
3f697a7e37
commit
b95fa4807e
@ -183,7 +183,7 @@ func handle(conn net.Conn, msg []byte) error {
|
||||
pprof.Lookup("heap").WriteTo(conn, 0)
|
||||
case signal.CPUProfile:
|
||||
if err := pprof.StartCPUProfile(conn); err != nil {
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
time.Sleep(30 * time.Second)
|
||||
pprof.StopCPUProfile()
|
||||
|
Loading…
x
Reference in New Issue
Block a user