Skip to content

Commit

Permalink
Merge pull request #182 from xiekeyang/close-body
Browse files Browse the repository at this point in the history
close response body
  • Loading branch information
erwinvaneyk authored Aug 7, 2018
2 parents 373c76e + fe0d1d6 commit 41e17e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/fnenv/fission/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ func (fe *FunctionEnv) Invoke(spec *types.TaskInvocationSpec) (*types.TaskInvoca
fnenv.FnActive.WithLabelValues(Name).Inc()
defer fnenv.FnExecTime.WithLabelValues(Name).Observe(float64(time.Since(timeStart)))
ctxLog.Infof("Invoking Fission function: '%v'.", req.URL)

resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, fmt.Errorf("error for reqUrl '%v': %v", url, err)
}
defer resp.Body.Close()

fnenv.FnActive.WithLabelValues(Name).Dec()
fnenv.FnActive.WithLabelValues(Name).Inc()

Expand Down

0 comments on commit 41e17e3

Please sign in to comment.