Skip to content

Commit

Permalink
handle error if CPU profile cannot start
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyll committed Jan 3, 2017
1 parent 3f697a7 commit b95fa48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b95fa48

Please sign in to comment.