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/thread_spawn.rb | |
parent | 6443cc4b87e3ba71ad661d795c3856f95a058a24 (diff) | |
download | rainbows-2489368a624cff50a330238cf3c3f16eb0bd743c.tar.gz |
Diffstat (limited to 'lib/rainbows/thread_spawn.rb')
-rw-r--r-- | lib/rainbows/thread_spawn.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/rainbows/thread_spawn.rb b/lib/rainbows/thread_spawn.rb index 40b37aa..5afb91e 100644 --- a/lib/rainbows/thread_spawn.rb +++ b/lib/rainbows/thread_spawn.rb @@ -37,11 +37,8 @@ module Rainbows sleep(0.1) # hope another process took it break # back to IO.select end - c = begin - l.accept_nonblock - rescue Errno::EAGAIN, Errno::ECONNABORTED - end or next - threads.add(Thread.new { process_client(c) }) + c = Rainbows.accept(l) and + threads.add(Thread.new { process_client(c) }) end rescue Errno::EINTR retry |