Skip to content

Commit

Permalink
[~] quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Noooste committed Mar 5, 2024
1 parent 6d318a3 commit 76a94f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion session.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,12 @@ func (s *Session) send(request *Request) (response *Response, err error) {
s.logRequest(request)

responseOK := make(chan bool, 1)

ctx, cancel := context.WithCancel(request.HttpRequest.Context())

request.HttpRequest = request.HttpRequest.WithContext(ctx)
if !request.IgnoreBody {
request.HttpRequest = request.HttpRequest.WithContext(ctx)
}

go func() {
resp, respErr := roundTripper.RoundTrip(request.HttpRequest)
Expand Down

0 comments on commit 76a94f1

Please sign in to comment.