about summary refs log tree commit homepage
path: root/lib/yahns/fdmap.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-10-26 03:03:23 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-26 03:43:56 +0000
commita224a0bbb16aeed9a1420c6a770e723cf30a28b3 (patch)
treefcb30fb35bc4ac1f2b41801b897892465d334e97 /lib/yahns/fdmap.rb
parenta28819801024dd88e93e2255f7210a66ea864c3e (diff)
downloadyahns-a224a0bbb16aeed9a1420c6a770e723cf30a28b3.tar.gz
This should help prevent some errors from popping up.
Obviously, we cannot spend too long doing this inside
a worker thread.
Diffstat (limited to 'lib/yahns/fdmap.rb')
-rw-r--r--lib/yahns/fdmap.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/fdmap.rb b/lib/yahns/fdmap.rb
index c268426..8d15962 100644
--- a/lib/yahns/fdmap.rb
+++ b/lib/yahns/fdmap.rb
@@ -71,7 +71,7 @@ class Yahns::Fdmap # :nodoc:
       nr += c.yahns_expire(tout)
     end
 
-    @fdmap_ary[io.fileno] = io
+    @fdmap_ary[io.fileno] = io if io
     @last_expire = Time.now.to_f
     msg = timeout ? "timeout=#{timeout}" : "client_timeout"
     @logger.info("dropping #{nr} of #@count clients for #{msg}")