Skip to content

Commit 7f12bf0

Browse files
authored
Merge pull request #322 from Shopify/fix-tagged-logger-leak
Fix a leak in Lobsters benchmark
2 parents 133a6c9 + 37e6b98 commit 7f12bf0

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

benchmarks/lobsters/benchmark.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
puts response_array.inspect
4848
raise "HTTP status is #{response_array.first} instead of 200 for req #{idx}/#{generator.routes.size}, #{path.inspect}. Is the benchmark app properly set up? See README.md."
4949
end
50+
response_array.last.close # Response might be a Rack::BodyProxy and MUST be closed.
5051
end
5152
end
5253

benchmarks/railsbench/benchmark.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
unless response_array.first == 200
3030
raise "HTTP response is #{response_array.first} instead of 200. Is the benchmark app properly set up? See README.md."
3131
end
32+
response_array.last.close # Response might be a Rack::BodyProxy and MUST be closed.
3233
end
3334
end
3435

benchmarks/railsbench/popular_lines.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def run_bench(app, visiting_routes)
2222
p response_array
2323
raise "HTTP response is #{response_array.first} instead of 200. Is the benchmark app properly set up? See README.md."
2424
end
25+
response_array.last.close # Response might be a Rack::BodyProxy and MUST be closed.
2526
end
2627
end
2728

benchmarks/railsbench/popular_methods.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def run_bench(app, visiting_routes)
2020
p response_array
2121
raise "HTTP response is #{response_array.first} instead of 200. Is the benchmark app properly set up? See README.md."
2222
end
23+
response_array.last.close # Response might be a Rack::BodyProxy and MUST be closed.
2324
end
2425
end
2526

0 commit comments

Comments
 (0)