Skip to content

Commit

Permalink
Ensure body is closed after buffering it. Fixes #877.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jan 10, 2020
1 parent 2cd668b commit b058947
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rack/response.rb
Expand Up @@ -236,6 +236,8 @@ def buffered_body!
body.each do |part|
@writer.call(part.to_s)
end

body.close if body.respond_to?(:close)
end

@buffered = true
Expand Down

0 comments on commit b058947

Please sign in to comment.