Skip to content

Commit

Permalink
feature #6: new Request/Response instance every time, for a lock free…
Browse files Browse the repository at this point in the history
… approach
  • Loading branch information
missedone committed Mar 9, 2016
1 parent f7e2d04 commit da3a8d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/github.com/eriklupander/gotling/httpreq.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,12 @@ func DoHttpRequest(httpAction HttpAction, resultsChannel chan HttpReqResult, ses
// TODO ADD TLS CERT CONF SUPPORT
c := &fasthttp.Client{}

req := fasthttp.AcquireRequest()
req := &fasthttp.Request{}
req.Header.SetMethod(httpAction.Method)
req.Header.SetRequestURI(SubstParams(sessionMap, httpAction.Url))
req.Header.Set("Accept", httpAction.Accept)

resp := fasthttp.AcquireResponse()

defer fasthttp.ReleaseResponse(resp)
defer fasthttp.ReleaseRequest(req)
resp := &fasthttp.Response{}

// TODO ADD TIMEOUT SUPPORT
start := time.Now()
Expand Down

0 comments on commit da3a8d5

Please sign in to comment.