From 7e7de6f43ca9c1e8d8ee2eae56578e31e22082e6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 11 Oct 2009 02:02:26 -0700 Subject: revactor: break on EBADF in the accepting actors Once our listeners get closed, we're as good as dead so we should exit to avoid spinning. --- lib/rainbows/revactor.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/rainbows/revactor.rb b/lib/rainbows/revactor.rb index 006a3b1..1b954b4 100644 --- a/lib/rainbows/revactor.rb +++ b/lib/rainbows/revactor.rb @@ -97,6 +97,8 @@ module Rainbows clients += 1 root.link(actor) rescue Errno::EAGAIN, Errno::ECONNABORTED + rescue Errno::EBADF + break rescue Object => e listen_loop_error(e) if alive end while alive -- cgit v1.2.3-24-ge0c7