diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-28 11:26:39 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-28 11:26:39 -0800 |
commit | 2489368a624cff50a330238cf3c3f16eb0bd743c (patch) | |
tree | 782d060210a50cbf96ee3df11781f76a96166298 /lib/rainbows/fiber_spawn.rb | |
parent | 6443cc4b87e3ba71ad661d795c3856f95a058a24 (diff) | |
download | rainbows-2489368a624cff50a330238cf3c3f16eb0bd743c.tar.gz |
Diffstat (limited to 'lib/rainbows/fiber_spawn.rb')
-rw-r--r-- | lib/rainbows/fiber_spawn.rb | 6 |
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 |