diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-27 01:20:47 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-27 01:23:46 -0700 |
commit | e9152a8463d62e46a772843f66ddedef52cd0b2c (patch) | |
tree | b786a54b439fea80f65f5ea3efe51c6c70e3c9b2 /lib/rainbows/revactor.rb | |
parent | 940501b7dade7a8ba3d1406ec62c28a682919fe0 (diff) | |
download | rainbows-e9152a8463d62e46a772843f66ddedef52cd0b2c.tar.gz |
Also new are added basic HTTP tests for UNIX domain socket handling (for all models, now, of course).
Diffstat (limited to 'lib/rainbows/revactor.rb')
-rw-r--r-- | lib/rainbows/revactor.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb index d9f246b..ddcbc04 100644 --- a/lib/rainbows/revactor.rb +++ b/lib/rainbows/revactor.rb @@ -1,9 +1,6 @@ # -*- encoding: binary -*- require 'revactor' - -# workaround revactor 0.1.4 still using the old Rev::Buffer -# ref: http://rubyforge.org/pipermail/revactor-talk/2009-October/000034.html -defined?(Rev::Buffer) or Rev::Buffer = IO::Buffer +Revactor::VERSION >= '0.1.5' or abort 'revactor 0.1.5 is required' module Rainbows @@ -137,16 +134,13 @@ module Rainbows def revactorize_listeners! LISTENERS.map! do |s| - if TCPServer === s + case s + when TCPServer ::Revactor::TCP.listen(s, nil) - elsif defined?(::Revactor::UNIX) && UNIXServer === s + when UNIXServer ::Revactor::UNIX.listen(s) - else - logger.error "your version of Revactor can't handle #{s.inspect}" - nil end end - LISTENERS.compact! end end |