From f07a1c59be7f7b41bf3216f6e67add05d0f04d02 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 6 Feb 2009 15:43:17 -0800 Subject: HttpRequest#reset! => HttpRequest#reset Keep this somewhat consistent with the HttpParser API which also exposes #reset instead of #reset! --- lib/unicorn.rb | 2 +- lib/unicorn/http_request.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index af99474..43e2db7 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -152,7 +152,7 @@ module Unicorn logger.error "Client error: #{e.inspect}" logger.error e.backtrace.join("\n") end - @request.reset! + @request.reset end end diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index 1e43bc9..aaa669a 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -14,7 +14,7 @@ module Unicorn @tempfile = @body = nil end - def reset! + def reset @body.truncate(0) rescue nil @body.close rescue nil @body = nil @@ -91,7 +91,7 @@ module Unicorn # Any errors means we should delete the file, including if the file # is dumped. Truncate it ASAP to help avoid page flushes to disk. - reset! + reset false end end -- cgit v1.2.3-24-ge0c7