about summary refs log tree commit homepage
path: root/lib/rainbows/thread_spawn.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/thread_spawn.rb')
-rw-r--r--lib/rainbows/thread_spawn.rb7
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