lib/rlyeh/deep_ones/closer.rb in rlyeh-0.0.2 vs lib/rlyeh/deep_ones/closer.rb in rlyeh-0.1.1
- old
+ new
@@ -2,17 +2,21 @@
module Rlyeh
module DeepOnes
class Closer
include Rlyeh::Dispatcher
-
+
def initialize(app)
@app = app
end
+ def call(env)
+ dispatch env
+ @app.call env if @app
+ end
+
on :quit do |env|
- env.connection.close_connection_after_writing
- throw :halt
+ throw :quit
end
end
end
end