about summary refs log tree commit homepage
path: root/lib/rainbows/fiber_spawn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/fiber_spawn.rb')
-rw-r--r--lib/rainbows/fiber_spawn.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/rainbows/fiber_spawn.rb b/lib/rainbows/fiber_spawn.rb
index da3db01..6104a7b 100644
--- a/lib/rainbows/fiber_spawn.rb
+++ b/lib/rainbows/fiber_spawn.rb
@@ -22,11 +22,7 @@ module Rainbows
       begin
         schedule do |l|
           break if G.cur >= limit
-          io = begin
-            l.accept_nonblock
-          rescue Errno::EAGAIN, Errno::ECONNABORTED
-            next
-          end
+          io = Rainbows.accept(l) or next
           ::Fiber.new { process_client(fio.new(io, ::Fiber.current)) }.resume
         end
       rescue => e