From 268ea97918026d3f24d1c6e15402812516c92742 Mon Sep 17 00:00:00 2001 From: Evan Weaver Date: Sat, 31 Jan 2009 14:38:26 -0800 Subject: Cleanup. --- lib/mongrel.rb | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/lib/mongrel.rb b/lib/mongrel.rb index b4d85f4..14cf09f 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -37,7 +37,7 @@ module Mongrel # By default, will return an instance of stdlib's Logger logging to STDERR def logger - @logger ||= Logger.new STDERR + @logger ||= Logger.new(STDERR) end end @@ -52,29 +52,15 @@ module Mongrel attr_accessor :http_body end - + # # This is the main driver of Mongrel, while the Mongrel::HttpParser and Mongrel::URIClassifier # make up the majority of how the server functions. It's a very simple class that just # has a thread accepting connections and a simple HttpServer.process_client function # to do the heavy lifting with the IO and Ruby. # - # You use it by doing the following: - # - # server = HttpServer.new("0.0.0.0", 3000) - # server.register("/stuff", MyNiftyHandler.new) - # server.run.join - # - # The last line can be just server.run if you don't want to join the thread used. - # If you don't though Ruby will mysteriously just exit on you. - # - # Ruby's thread implementation is "interesting" to say the least. Experiments with - # *many* different types of IO processing simply cannot make a dent in it. Future - # releases of Mongrel will find other creative ways to make threads faster, but don't - # hold your breath until Ruby 1.9 is actually finally useful. class HttpServer attr_reader :acceptor attr_reader :workers - attr_reader :classifier attr_reader :host attr_reader :port attr_reader :throttle -- cgit v1.2.3-24-ge0c7 From 42b9e95d06ab3d1de1d0409aba78b869615ebda8 Mon Sep 17 00:00:00 2001 From: Evan Weaver Date: Sat, 31 Jan 2009 14:38:53 -0800 Subject: Cleanup. --- lib/mongrel.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/mongrel.rb b/lib/mongrel.rb index 14cf09f..83ee578 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -90,7 +90,6 @@ module Mongrel def initialize(host, port, app, options = {}) options = DEFAULTS.merge(options) - tries = 0 @socket = TCPServer.new(host, port) if defined?(Fcntl::FD_CLOEXEC) @socket.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) -- cgit v1.2.3-24-ge0c7