Skip to content

Commit

Permalink
Call #close on the old body after building the new body to prevent th…
Browse files Browse the repository at this point in the history
…read joining errors
  • Loading branch information
mattfawcett committed Oct 4, 2011
1 parent 28cc8cd commit 21bdff4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/airbrake/user_informer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def call(env)
body.each do |chunk|
new_body << chunk.gsub("<!-- AIRBRAKE ERROR -->", replacement(env['airbrake.error_id']))
end
body.close if body.respond_to?(:close)
headers['Content-Length'] = new_body.sum(&:length).to_s
body = new_body
end
Expand Down

0 comments on commit 21bdff4

Please sign in to comment.