diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-06 15:43:17 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-09 19:50:55 -0800 |
commit | f07a1c59be7f7b41bf3216f6e67add05d0f04d02 (patch) | |
tree | 7be546a70dfd455c83b6ae5ec577bc7d628d294a /lib | |
parent | 25bbb88bcc16c1c0a10efc99472b05e9f6b45861 (diff) | |
download | unicorn-f07a1c59be7f7b41bf3216f6e67add05d0f04d02.tar.gz |
HttpRequest#reset! => HttpRequest#reset
Keep this somewhat consistent with the HttpParser API which also exposes #reset instead of #reset!
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicorn.rb | 2 | ||||
-rw-r--r-- | lib/unicorn/http_request.rb | 4 |
2 files changed, 3 insertions, 3 deletions
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 |