Skip to content

Commit

Permalink
comment why we ignore errors parsing params
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbailey committed Jan 9, 2020
1 parent a1f464f commit 5517743
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions command/agent/agent_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ func (s *HTTPServer) AgentPprofRequest(resp http.ResponseWriter, req *http.Reque
func (s *HTTPServer) agentPprof(reqType pprof.ReqType, resp http.ResponseWriter, req *http.Request) ([]byte, error) {

// Parse query param int values
// Errors are dropped here and default to their zero values.
// This is to mimick the functionality that net/pprof implements.
seconds, _ := strconv.Atoi(req.URL.Query().Get("seconds"))
debug, _ := strconv.Atoi(req.URL.Query().Get("debug"))
gc, _ := strconv.Atoi(req.URL.Query().Get("gc"))
Expand Down

0 comments on commit 5517743

Please sign in to comment.