Skip to content

Commit

Permalink
Add request context to make sure client closed connection
Browse files Browse the repository at this point in the history
  • Loading branch information
alinz committed May 2, 2024
1 parent d9809f3 commit f719514
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (c *Client) Get(ctx context.Context, consumerOpts ...bus.ConsumerOpt) iter.
consumer.QueueName = header.Get("Consumer-Queue")
isAutoAck := header.Get("Consumer-Ack-Strategy") == "auto"

ctx, cancel := context.WithCancel(ctx)
ctx, cancel := context.WithCancel(req.Context())

incomings := sse.Receive(ctx, resp.Body)

Expand Down

0 comments on commit f719514

Please sign in to comment.