We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 418ca04 commit 73c6b38Copy full SHA for 73c6b38
lib/async/http/protocol/http1/server.rb
@@ -50,7 +50,10 @@ def each(task: Task.current)
50
response = yield(request, self)
51
body = response&.body
52
53
- return if hijacked?
+ if hijacked?
54
+ body&.close
55
+ return
56
+ end
57
58
task.defer_stop do
59
# If a response was generated, send it:
test/async/http/protocol/http11.rb
@@ -103,7 +103,7 @@ def around
103
end
104
105
it "works properly" do
106
- expect(body).not.to receive(:close)
+ expect(body).to receive(:close)
107
108
response = client.get("/")
109
0 commit comments