Open
Description
I'm attempting to call Async::HTTP::Client#get
with a block, but the block never seems to execute?
Steps To Reproduce
require 'bundler/setup'
require 'async/http'
require 'json'
endpoint = Async::HTTP::Endpoint.for('https','example.com')
client = Async::HTTP::Client.new(endpoint)
Async do
client.get('/') do |response|
puts "got here"
puts response.read
end
end
Expected Result
got here
...
Actual Result
0.09s warn: Async::Pool::Controller: Async::Pool::Controller Gardener [oid=0x67c] [ec=0x690] [pid=25251] [2024-07-26 21:28:18 -0700]
| Closing resource while still in use!
| {
| "resource": "#<Async::HTTP::Protocol::HTTP2::Client 1 requests, 0 active streams>",
| "usage": 1
| }
Versions
- ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-linux]
- async (2.14.2)
- protocol-http (0.28.1)
- async-http (0.69.0)
Metadata
Metadata
Assignees
Labels
No labels